From 648bf6a808253b5c7fef857bc4b656194df053e2 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 28 Aug 2014 11:24:48 -0700 Subject: [PATCH] std/filters: add tagged configuration options to dbnd and sync plugins --- src/std/filters/dbnd.c | 11 +++++++---- src/std/filters/sync.c | 16 +++++++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/std/filters/dbnd.c b/src/std/filters/dbnd.c index 36c852b2b..0278a9a33 100644 --- a/src/std/filters/dbnd.c +++ b/src/std/filters/dbnd.c @@ -1,13 +1,14 @@ /*************************************************************************\ * Copyright (c) 2010 Brookhaven National Laboratory. * Copyright (c) 2010 Helmholtz-Zentrum Berlin -* fuer Materialien und Energie GmbH. +* für Materialien und Energie GmbH. +* Copyright (c) 2014 ITER Organization. * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * Author: Ralph Lange + * Author: Ralph Lange */ #include @@ -34,8 +35,10 @@ chfPluginEnumType modeEnum[] = { {"abs", 0}, {"rel", 1}, {NULL,0} }; static const chfPluginArgDef opts[] = { - chfDouble (myStruct, cval, "d", 0, 1), - chfEnum (myStruct, mode, "m", 0, 1, modeEnum), + chfDouble (myStruct, cval, "d", 0, 1), + chfEnum (myStruct, mode, "m", 0, 1, modeEnum), + chfTagDouble (myStruct, cval, "abs", mode, 0, 0, 1), + chfTagDouble (myStruct, cval, "rel", mode, 1, 0, 1), chfPluginArgEnd }; diff --git a/src/std/filters/sync.c b/src/std/filters/sync.c index 9dfd47197..ec1bcd409 100644 --- a/src/std/filters/sync.c +++ b/src/std/filters/sync.c @@ -22,9 +22,9 @@ #define STATE_NAME_LENGTH 20 static const -chfPluginEnumType modeEnum[] = { {"before", 0}, {"first", 1}, - {"last", 2}, {"after", 3}, - {"while", 4}, {"unless", 5}, +chfPluginEnumType modeEnum[] = { {"before", 0}, {"first", 1}, + {"last", 2}, {"after", 3}, + {"while", 4}, {"unless", 5}, {NULL,0} }; typedef enum syncMode { syncModeBefore=0, @@ -47,8 +47,14 @@ static void *myStructFreeList; static const chfPluginArgDef opts[] = { - chfEnum (myStruct, mode, "m", 1, 1, modeEnum), - chfString (myStruct, state, "s", 1, 0), + chfEnum (myStruct, mode, "m", 1, 1, modeEnum), + chfString (myStruct, state, "s", 1, 0), + chfTagString (myStruct, state, "before", mode, 0, 1, 0), + chfTagString (myStruct, state, "first", mode, 1, 1, 0), + chfTagString (myStruct, state, "last", mode, 2, 1, 0), + chfTagString (myStruct, state, "after", mode, 3, 1, 0), + chfTagString (myStruct, state, "while", mode, 4, 1, 0), + chfTagString (myStruct, state, "unless", mode, 5, 1, 0), chfPluginArgEnd };