Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
75bbb1a252 | |||
227bb83f60 | |||
4edff374d0 | |||
9273476135 | |||
8b9359723a | |||
bf55d4c202 | |||
1cace82a70 | |||
85e8632b02 | |||
1994912271 | |||
98fa595753 | |||
f6640b3418 | |||
4747bb5bc7 | |||
bd9ee1c660 | |||
22deae23e5 | |||
7f22d5bdc6 | |||
1c9278812b | |||
2ea014ae46 |
3
.VERSION
Normal file
3
.VERSION
Normal file
@ -0,0 +1,3 @@
|
||||
COMMIT: $Format:%H$
|
||||
REFS: $Format:%D$
|
||||
DATE: $Format:%ci$
|
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
GNUmakefile export-ignore
|
||||
.VERSION export-subst
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,3 +6,5 @@ dbd
|
||||
include
|
||||
*.pdf
|
||||
*.*log
|
||||
StreamVersion.h
|
||||
*.local
|
||||
|
27
GNUmakefile
27
GNUmakefile
@ -19,18 +19,27 @@ SOURCES += $(FORMATS:%=src/%Converter.cc)
|
||||
SOURCES += $(BUSSES:%=src/%Interface.cc)
|
||||
SOURCES += $(STREAM_SRCS:%=src/%)
|
||||
|
||||
HEADERS += devStream.h
|
||||
HEADERS += StreamFormat.h
|
||||
HEADERS += StreamFormatConverter.h
|
||||
HEADERS += StreamBuffer.h
|
||||
HEADERS += StreamError.h
|
||||
HEADERS += src/devStream.h
|
||||
HEADERS += src/StreamFormat.h
|
||||
HEADERS += src/StreamFormatConverter.h
|
||||
HEADERS += src/StreamBuffer.h
|
||||
HEADERS += src/StreamError.h
|
||||
HEADERS += src/StreamVersion.h
|
||||
HEADERS += src/StreamProtocol.h
|
||||
HEADERS += src/StreamBusInterface.h
|
||||
HEADERS += src/StreamCore.h
|
||||
HEADERS += src/MacroMagic.h
|
||||
|
||||
StreamCore.o StreamCore.d: streamReferences
|
||||
CPPFLAGS += -DSTREAM_INTERNAL -I$(COMMON_DIR)
|
||||
|
||||
# Update version string (contains __DATE__ and __TIME__)
|
||||
# each time anything changes.
|
||||
StreamVersion.o: $(filter-out StreamVersion.o stream_exportAddress.o,$(LIBOBJS))
|
||||
# Update version string each time anything changes
|
||||
StreamVersion$(OBJ) StreamVersion$(DEP): $(COMMON_DIR)/StreamVersion.h $(filter-out StreamVersion$(OBJ) stream_exportAddress$(OBJ),$(LIBOBJS) $(LIBRARY_OBJS))
|
||||
|
||||
$(COMMON_DIR)/StreamVersion.h: $(filter-out StreamVersion.h,$(notdir $(SOURCES) $(HEADERS)))
|
||||
@echo Creating $@
|
||||
$(PERL) ../src/makeStreamVersion.pl $@
|
||||
|
||||
StreamCore$(OBJ) StreamCore$(DEP): streamReferences
|
||||
streamReferences:
|
||||
$(PERL) ../src/makeref.pl Interface $(BUSSES) > $@
|
||||
$(PERL) ../src/makeref.pl Converter $(FORMATS) >> $@
|
||||
|
19
Makefile
19
Makefile
@ -21,21 +21,10 @@
|
||||
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
|
||||
#########################################################################/
|
||||
|
||||
TOP = ..
|
||||
ifneq ($(wildcard ../configure),)
|
||||
# We are in an EPICS R3.14+ <TOP> location
|
||||
include $(TOP)/configure/CONFIG
|
||||
else ifneq ($(wildcard ../config),)
|
||||
# We are in an EPICS R3.13 <TOP> location
|
||||
CONFIG = $(TOP)/config
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
else
|
||||
# Using our own local configuration
|
||||
TOP = .
|
||||
DIRS = configure
|
||||
src_DEPEND_DIRS := $(DIRS)
|
||||
include $(TOP)/configure/CONFIG
|
||||
endif
|
||||
TOP = .
|
||||
DIRS = configure
|
||||
src_DEPEND_DIRS := $(DIRS)
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
DIRS += src
|
||||
DIRS += streamApp
|
||||
|
@ -24,4 +24,3 @@ endif
|
||||
|
||||
# dbst based database optimization (default: NO)
|
||||
DB_OPT = NO
|
||||
HOST_OPT=NO
|
||||
|
@ -54,15 +54,17 @@ git clone https://github.com/paulscherrerinstitute/StreamDevice.git
|
||||
<p class="new">
|
||||
<em>StreamDevice</em> now comes with a standard
|
||||
<kbd>configure</kbd> directory.
|
||||
But it can still be built in an external <em><top></em>
|
||||
<del>But it can still be built in an external <em><top></em>
|
||||
directory as in previous versions.
|
||||
It will automatically detect <em><top></em> locations
|
||||
from the presence of <kbd>../configure</kbd> or <kbd>../config</kbd>
|
||||
directories.
|
||||
directories.</del> Using an upper level <kbd>../configure</kbd> is
|
||||
no longer supported due to compatibility issues with <em>SynApps</em>.
|
||||
</p>
|
||||
<p class="new">
|
||||
Edit the <kbd>configure/RELEASE</kbd> file to specify the install location
|
||||
of EPICS base and of additional software modules, for example:
|
||||
of EPICS base and of additional software modules or add a
|
||||
<kbd>configure/RELEASE.local</kbd> file to overwrite, for example:
|
||||
<pre>
|
||||
EPICS_BASE=/home/epics/base-3.16.1
|
||||
</pre>
|
||||
|
@ -24,10 +24,16 @@
|
||||
#include "StreamError.h"
|
||||
#include <ctype.h>
|
||||
#if defined(__vxworks) || defined(vxWorks)
|
||||
#include <version.h>
|
||||
#if defined(_WRS_VXWORKS_MAJOR) && _WRS_VXWORKS_MAJOR > 6 || (_WRS_VXWORKS_MAJOR == 6 && _WRS_VXWORKS_MINOR > 8)
|
||||
#include <stdint.h>
|
||||
#define PRIX32 "X"
|
||||
#define PRIu32 "u"
|
||||
#else
|
||||
#define PRIX32 "lX"
|
||||
#define PRIu32 "lu"
|
||||
#endif
|
||||
#define PRIX8 "X"
|
||||
#define SCNx8 "hhx"
|
||||
#define uint_fast8_t uint8_t
|
||||
#define int_fast8_t int8_t
|
||||
#elif defined(_MSC_VER) && _MSC_VER < 1700 /* Visual Studio 2010 does not have inttypes.h */
|
||||
@ -35,7 +41,6 @@
|
||||
#define PRIX32 "X"
|
||||
#define PRIu32 "u"
|
||||
#define PRIX8 "X"
|
||||
#define SCNx8 "hhx"
|
||||
#else
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <stdint.h>
|
||||
@ -747,7 +752,7 @@ scanPseudo(const StreamFormat& format, StreamBuffer& input, size_t& cursor)
|
||||
debug("ChecksumConverter %s: input checksum is 0x%0*" PRIX32 "\n",
|
||||
checksumMap[fnum].name, 2*checksumMap[fnum].bytes, sum);
|
||||
|
||||
uint_fast8_t inchar;
|
||||
unsigned int inchar;
|
||||
|
||||
if (format.flags & sign_flag) // decimal
|
||||
{
|
||||
@ -774,7 +779,7 @@ scanPseudo(const StreamFormat& format, StreamBuffer& input, size_t& cursor)
|
||||
{
|
||||
if (format.flags & zero_flag) // ASCII
|
||||
{
|
||||
if (sscanf(input(cursor+2*i), "%2" SCNx8, (int8_t *) &inchar) != 1)
|
||||
if (sscanf(input(cursor+2*i), "%2x", &inchar) != 1)
|
||||
{
|
||||
debug("ChecksumConverter %s: Input byte '%s' is not a hex byte\n",
|
||||
checksumMap[fnum].name, input.expand(cursor+2*i,2)());
|
||||
@ -818,7 +823,7 @@ scanPseudo(const StreamFormat& format, StreamBuffer& input, size_t& cursor)
|
||||
{
|
||||
if (format.flags & zero_flag) // ASCII
|
||||
{
|
||||
sscanf(input(cursor+2*i), "%2" SCNx8, (int8_t *) &inchar);
|
||||
sscanf(input(cursor+2*i), "%2x", &inchar);
|
||||
}
|
||||
else
|
||||
if (format.flags & left_flag) // poor man's hex: 0x30 - 0x3F
|
||||
|
30
src/Makefile
30
src/Makefile
@ -21,16 +21,8 @@
|
||||
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
|
||||
#########################################################################/
|
||||
|
||||
TOP = ../..
|
||||
ifneq ($(wildcard ../../configure),)
|
||||
include $(TOP)/configure/CONFIG
|
||||
else ifneq ($(wildcard ../../config),)
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
else
|
||||
TOP= ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
endif
|
||||
TOP= ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
-include CONFIG_STREAM
|
||||
-include ../CONFIG_STREAM
|
||||
@ -74,14 +66,28 @@ endif
|
||||
LIB_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
INC += devStream.h
|
||||
INC += StreamFormat.h
|
||||
INC += StreamFormatConverter.h
|
||||
INC += StreamBuffer.h
|
||||
INC += StreamError.h
|
||||
INC += StreamVersion.h
|
||||
INC += StreamProtocol.h
|
||||
INC += StreamBusInterface.h
|
||||
INC += StreamCore.h
|
||||
INC += MacroMagic.h
|
||||
|
||||
# switch off annoying rset warnings in 3.16+
|
||||
CPPFLAGS += -DUSE_TYPED_RSET
|
||||
|
||||
CPPFLAGS += -DSTREAM_INTERNAL
|
||||
|
||||
-include $(TOP)/configure/RULES
|
||||
|
||||
# Update version string whenever something changes
|
||||
StreamVersion$(OBJ): $(filter-out StreamVersion.o,$(LIBOBJS)$(LIBRARY_OBJS))
|
||||
# Update version string whenever something changed.
|
||||
StreamVersion$(OBJ): $(COMMON_DIR)/StreamVersion.h $(filter-out StreamVersion$(OBJ),$(LIBOBJS) $(LIBRARY_OBJS)) ../CONFIG_STREAM
|
||||
$(COMMON_DIR)/StreamVersion.h: ../../.VERSION $(SRCS) $(filter-out StreamVersion.h, $(INC))
|
||||
@echo Creating $@
|
||||
$(PERL) ../makeStreamVersion.pl $@
|
||||
|
||||
# Add references to all registrars to main file to avoid
|
||||
# missing initialization.
|
||||
|
@ -29,11 +29,4 @@ endif
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
include ../CONFIG_STREAM
|
||||
|
||||
DBDNAME = stream.dbd
|
||||
INC += devStream.h
|
||||
|
||||
include $(EPICS_BASE)/config/RULES.Host
|
||||
|
||||
# create stream.dbd from all RECORDTYPES
|
||||
stream.dbd: ../CONFIG_STREAM
|
||||
$(PERL) ../makedbd.pl -3.13 $(RECORDTYPES) > $@
|
||||
|
@ -42,17 +42,37 @@ SRCS.c += $(filter %.c,$(STREAM_SRCS:%=%../%))
|
||||
|
||||
LIBOBJS = $(patsubst ../%,%.o,$(basename $(SRCS.cc) $(SRCS.c)))
|
||||
|
||||
DBDNAME = stream.dbd
|
||||
|
||||
INC += devStream.h
|
||||
INC += StreamFormat.h
|
||||
INC += StreamFormatConverter.h
|
||||
INC += StreamBuffer.h
|
||||
INC += StreamError.h
|
||||
INC += StreamVersion.h
|
||||
|
||||
include $(EPICS_BASE)/config/RULES.Vx
|
||||
include ../../config/RULES.munch
|
||||
|
||||
DEPENDS: depends
|
||||
-include DEPENDS
|
||||
|
||||
CPPFLAGS += -DSTREAM_INTERNAL
|
||||
|
||||
# Update version string whenever something changes
|
||||
StreamVersion.o: ../*.c ../*.h ../*.cc ../CONFIG_STREAM
|
||||
$(LIBNAME): StreamVersion.o
|
||||
|
||||
StreamVersion.o: StreamVersion.h $(filter-out StreamVersion.o,$(LIBOBJS)) ../CONFIG_STREAM
|
||||
StreamVersion.h: $(SRCS.cc) $(SRCS.c) $(add-prefix ../,$(filter-out StreamVersion.h, $(INC)))
|
||||
@echo Creating $@ from git tag
|
||||
$(PERL) ../makeStreamVersion.pl > $@
|
||||
|
||||
StreamCore.o: streamReferences
|
||||
|
||||
streamReferences:
|
||||
touch $@
|
||||
|
||||
# create stream.dbd from all RECORDTYPES
|
||||
stream.dbd: ../CONFIG_STREAM
|
||||
$(PERL) ../makedbd.pl -3.13 $(RECORDTYPES) > $@
|
||||
|
||||
|
@ -187,9 +187,12 @@ bool StreamCore::
|
||||
parse(const char* filename, const char* _protocolname)
|
||||
{
|
||||
protocolname = _protocolname;
|
||||
// extract substitutions from protocolname "name(sub1,sub2)"
|
||||
// extract substitutions from protocolname "name ( sub1, sub2 ) "
|
||||
ssize_t i = protocolname.find('(');
|
||||
if (i >= 0)
|
||||
if (i < 0) i = 0;
|
||||
while (protocolname[i-1] == ' ')
|
||||
protocolname.remove(--i, 1);
|
||||
if (protocolname[i] == '(')
|
||||
{
|
||||
while (i < (ssize_t)protocolname.length())
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ StreamProtocolParser* StreamProtocolParser::
|
||||
readFile(const char* filename)
|
||||
{
|
||||
FILE* file;
|
||||
#ifdef windows
|
||||
#ifdef _WIN32
|
||||
const char pathseparator = ';';
|
||||
const char dirseparator = '\\';
|
||||
#else
|
||||
|
@ -20,12 +20,22 @@
|
||||
* along with StreamDevice. If not, see https://www.gnu.org/licenses/.
|
||||
*************************************************************************/
|
||||
|
||||
#include "devStream.h"
|
||||
#include "StreamVersion.h"
|
||||
|
||||
#define STR2(x) #x
|
||||
#define STR(x) STR2(x)
|
||||
const char StreamVersion [] =
|
||||
"StreamDevice " STR(STREAM_MAJOR)
|
||||
"StreamDevice"
|
||||
#ifdef STREAM_MAJOR
|
||||
" " STR(STREAM_MAJOR)
|
||||
"." STR(STREAM_MINOR)
|
||||
"." STR(STREAM_PATCHLEVEL)
|
||||
" built " __DATE__ " " __TIME__;
|
||||
STREAM_DEV
|
||||
#endif
|
||||
#ifdef STREAM_COMMIT_DATE
|
||||
" " STREAM_COMMIT_DATE
|
||||
#endif
|
||||
#ifdef STREAM_COMMIT_HASH
|
||||
"\n commit: " STREAM_COMMIT_HASH
|
||||
#endif
|
||||
;
|
||||
|
@ -28,9 +28,9 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define STREAM_MAJOR 2
|
||||
#define STREAM_MINOR 8
|
||||
#define STREAM_PATCHLEVEL 12
|
||||
#ifndef STREAM_INTERNAL
|
||||
#include "StreamVersion.h"
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
#define OK 0
|
||||
|
@ -171,10 +171,10 @@ static long writeData(dbCommon *record, format_t *format)
|
||||
break;
|
||||
#ifdef DBR_INT64
|
||||
case DBF_INT64:
|
||||
dval = ((epicsInt64 *)aai->bptr)[nowd];
|
||||
dval = (double)((epicsInt64 *)aai->bptr)[nowd];
|
||||
break;
|
||||
case DBF_UINT64:
|
||||
dval = ((epicsUInt64 *)aai->bptr)[nowd];
|
||||
dval = (double)((epicsUInt64 *)aai->bptr)[nowd];
|
||||
break;
|
||||
#endif
|
||||
case DBF_LONG:
|
||||
@ -214,10 +214,10 @@ static long writeData(dbCommon *record, format_t *format)
|
||||
{
|
||||
#ifdef DBR_INT64
|
||||
case DBF_INT64:
|
||||
lval = ((epicsInt64 *)aai->bptr)[nowd];
|
||||
lval = (long)((epicsInt64 *)aai->bptr)[nowd];
|
||||
break;
|
||||
case DBF_UINT64:
|
||||
lval = ((epicsUInt64 *)aai->bptr)[nowd];
|
||||
lval = (long)((epicsUInt64 *)aai->bptr)[nowd];
|
||||
break;
|
||||
#endif
|
||||
case DBF_LONG:
|
||||
|
@ -200,10 +200,10 @@ static long writeData(dbCommon *record, format_t *format)
|
||||
break;
|
||||
#ifdef DBR_INT64
|
||||
case DBF_INT64:
|
||||
dval = ((epicsInt64 *)aao->bptr)[nowd];
|
||||
dval = (double)((epicsInt64 *)aao->bptr)[nowd];
|
||||
break;
|
||||
case DBF_UINT64:
|
||||
dval = ((epicsUInt64 *)aao->bptr)[nowd];
|
||||
dval = (double)((epicsUInt64 *)aao->bptr)[nowd];
|
||||
break;
|
||||
#endif
|
||||
case DBF_LONG:
|
||||
@ -243,10 +243,10 @@ static long writeData(dbCommon *record, format_t *format)
|
||||
{
|
||||
#ifdef DBR_INT64
|
||||
case DBF_INT64:
|
||||
lval = ((epicsInt64 *)aao->bptr)[nowd];
|
||||
lval = (long)((epicsInt64 *)aao->bptr)[nowd];
|
||||
break;
|
||||
case DBF_UINT64:
|
||||
lval = ((epicsUInt64 *)aao->bptr)[nowd];
|
||||
lval = (long)((epicsUInt64 *)aao->bptr)[nowd];
|
||||
break;
|
||||
#endif
|
||||
case DBF_LONG:
|
||||
|
@ -73,7 +73,7 @@ static long readData(dbCommon *record, format_t *format)
|
||||
if (record->pact) return DO_NOT_CONVERT;
|
||||
/* In @init handler, no processing, enforce monitor updates. */
|
||||
ao->omod = ao->oval != val;
|
||||
ao->orbv = ao->oval = val;
|
||||
ao->orbv = (epicsInt32)(ao->oval = val);
|
||||
monitor_mask = recGblResetAlarms(record);
|
||||
if (!(fabs(ao->mlst - val) <= ao->mdel))
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ static long readData(dbCommon *record, format_t *format)
|
||||
{
|
||||
lsi->val[length] = 0;
|
||||
}
|
||||
lsi->len = length;
|
||||
lsi->len = (epicsUInt32)length;
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ static long readData(dbCommon *record, format_t *format)
|
||||
{
|
||||
lso->val[length] = 0;
|
||||
}
|
||||
lso->len = length;
|
||||
lso->len = (epicsUInt32)length;
|
||||
if (record->pact) return OK;
|
||||
/* In @init handler, no processing, enforce monitor updates. */
|
||||
monitor_mask = recGblResetAlarms(record);
|
||||
|
@ -172,10 +172,10 @@ static long writeData(dbCommon *record, format_t *format)
|
||||
break;
|
||||
#ifdef DBR_INT64
|
||||
case DBF_INT64:
|
||||
dval = ((epicsInt64 *)wf->bptr)[nowd];
|
||||
dval = (double)((epicsInt64 *)wf->bptr)[nowd];
|
||||
break;
|
||||
case DBF_UINT64:
|
||||
dval = ((epicsUInt64 *)wf->bptr)[nowd];
|
||||
dval = (double)((epicsUInt64 *)wf->bptr)[nowd];
|
||||
break;
|
||||
#endif
|
||||
case DBF_LONG:
|
||||
@ -215,10 +215,10 @@ static long writeData(dbCommon *record, format_t *format)
|
||||
{
|
||||
#ifdef DBR_INT64
|
||||
case DBF_INT64:
|
||||
lval = ((epicsInt64 *)wf->bptr)[nowd];
|
||||
lval = (long)((epicsInt64 *)wf->bptr)[nowd];
|
||||
break;
|
||||
case DBF_UINT64:
|
||||
lval = ((epicsUInt64 *)wf->bptr)[nowd];
|
||||
lval = (long)((epicsUInt64 *)wf->bptr)[nowd];
|
||||
break;
|
||||
#endif
|
||||
case DBF_LONG:
|
||||
|
77
src/makeStreamVersion.pl
Normal file
77
src/makeStreamVersion.pl
Normal file
@ -0,0 +1,77 @@
|
||||
##########################################################################
|
||||
# This is a helper script for StreamDevice.
|
||||
# It generates a version file from git tags.
|
||||
#
|
||||
# (C) 2020 Dirk Zimoch (dirk.zimoch@psi.ch)
|
||||
#
|
||||
# This file is part of StreamDevice.
|
||||
#
|
||||
# StreamDevice is free software: You can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published
|
||||
# by the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# StreamDevice 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
|
||||
#########################################################################/
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
my ( $major, $minor, $patch, $dev, $date, $hash );
|
||||
|
||||
if (my $version = `git describe --tags --abbrev=0 --dirty --match "[0-9]*" 2>/dev/null`) {
|
||||
if ($version =~ m/(\d+)\.(\d+)\.(\d+)?(.*)?/) {
|
||||
$major = $1; $minor = $2; $patch = $3; $dev = $4;
|
||||
}
|
||||
if (`git log -1 --format="%H %ci"`=~ m/([[:xdigit:]]+) (.+)/) {
|
||||
$hash = $1; $date = $2;
|
||||
}
|
||||
}
|
||||
if (!$major) {
|
||||
if (open(my $fh, '<', '../../.VERSION')) {
|
||||
while (my $line = <$fh>) {
|
||||
if ($line =~ m/COMMIT: *([[:xdigit:]]+)/) {
|
||||
$hash = $1;
|
||||
}
|
||||
if ($line =~ m/REFS: .*tag: *(\d+)\.(\d+)\.?(\d+)?/) {
|
||||
$major = $1; $minor = $2; $patch = $3 or $patch = 0;
|
||||
}
|
||||
if ($line =~ m/DATE: *([-0-9:+ ]*)/) {
|
||||
$date = $1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print "neither git repo nor .VERSION file found\n";
|
||||
}
|
||||
}
|
||||
|
||||
open my $out, '>', @ARGV or die $!;
|
||||
print $out <<EOF;
|
||||
/* Generated file */
|
||||
|
||||
#ifndef StreamVersion_h
|
||||
#define StreamVersion_h
|
||||
|
||||
EOF
|
||||
if ($major) {
|
||||
print $out <<EOF;
|
||||
#define STREAM_MAJOR $major
|
||||
#define STREAM_MINOR $minor
|
||||
#define STREAM_PATCHLEVEL $patch
|
||||
#define STREAM_DEV "$dev"
|
||||
EOF
|
||||
}
|
||||
if ($hash) {
|
||||
print $out "#define STREAM_COMMIT_HASH \"$hash\"\n";
|
||||
}
|
||||
if ($date) {
|
||||
print $out "#define STREAM_COMMIT_DATE \"$date\"\n";
|
||||
}
|
||||
print $out "#endif /* StreamVersion_h */\n";
|
||||
close $out
|
@ -21,16 +21,8 @@
|
||||
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
|
||||
#########################################################################/
|
||||
|
||||
TOP = ../..
|
||||
ifneq ($(wildcard ../../configure),)
|
||||
include $(TOP)/configure/CONFIG
|
||||
else ifneq ($(wildcard ../../config),)
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
else
|
||||
TOP= ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
endif
|
||||
TOP= ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
PROD = streamApp
|
||||
DBD = streamApp.dbd
|
||||
@ -68,6 +60,10 @@ PROD_LIBS += sscan
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(words $(SNCSEQ) $(SYNAPPS)), 0)
|
||||
PROD_LIBS += seq pv
|
||||
endif
|
||||
|
||||
streamApp_DBD += stream.dbd
|
||||
|
||||
ifdef PCRE
|
||||
|
@ -22,20 +22,20 @@
|
||||
record (stringout, "$(P):cmd")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
field (OUT, "@test.proto command terminal")
|
||||
field (OUT, "@test.proto command terminal")
|
||||
field (PRIO, "HIGH")
|
||||
field (VAL, "")
|
||||
}
|
||||
record (stringout, "$(P):info")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
field (OUT, "@test.proto info terminal")
|
||||
field (OUT, "@test.proto info terminal ")
|
||||
field (PRIO, "HIGH")
|
||||
}
|
||||
record (stringout, "$(P):request")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
field (OUT, "@test.proto request($(P):reply.VAL) terminal")
|
||||
field (OUT, "@test.proto request ($(P):reply.VAL) terminal")
|
||||
field (PRIO, "HIGH")
|
||||
}
|
||||
record (stringin, "$(P):reply")
|
||||
@ -44,7 +44,7 @@ record (stringin, "$(P):reply")
|
||||
record (stringout, "$(P):checksum")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
field (OUT, "@test.proto checksum($(CHKSUM=sum)) terminal")
|
||||
field (OUT, "@test.proto checksum ($(CHKSUM=sum)) terminal")
|
||||
}
|
||||
record (stringin, "$(P):spy")
|
||||
{
|
||||
|
Reference in New Issue
Block a user