Document the sync filter.
Also, use enum values where we have them.
This commit is contained in:
committed by
Ralph Lange
parent
61cc341132
commit
5b9bee82a5
@@ -4,7 +4,7 @@ Channel Filters can be applied to Channel Access channels by a client, using
|
||||
a JSON Field Modifier to select the filter and any parameters.
|
||||
The following filters are available in this release:
|
||||
|
||||
=over 4
|
||||
=over
|
||||
|
||||
=item * L<TimeStamp|/"TimeStamp Filter "ts"">
|
||||
|
||||
@@ -88,7 +88,7 @@ percentage.
|
||||
|
||||
=head4 Parameters
|
||||
|
||||
=over 4
|
||||
=over
|
||||
|
||||
=item Deadband C<"d">
|
||||
|
||||
@@ -136,6 +136,54 @@ registrar(syncInitialize)
|
||||
|
||||
=head3 Synchronize Filter C<"sync">
|
||||
|
||||
...
|
||||
This filter is used to dynamically enable or disable monitors according
|
||||
to a condition and a state variable declared by the IOC.
|
||||
|
||||
State variables have a boolean value and can be set by a binary output
|
||||
record, an iocsh command or by other software running in the IOC calling
|
||||
C<dbStateSet()>.
|
||||
|
||||
=head4 Parameters
|
||||
|
||||
=over
|
||||
|
||||
=item Mode C<"m">
|
||||
|
||||
A single word from the list below, enclosed in double quotes C<">.
|
||||
This controls how the state value should affect the monitor stream.
|
||||
|
||||
=over
|
||||
|
||||
=item C<"before"> E<mdash> only the last value received before the state
|
||||
changes from false to true is forwarded to the client.
|
||||
|
||||
=item C<"first"> E<mdash> only the first value received after the state
|
||||
changes from true to false is forwarded to the client.
|
||||
|
||||
=item C<"while"> E<mdash> values are forwarded to the client as long as
|
||||
the state is true.
|
||||
|
||||
=item C<"last"> E<mdash> only the last value received before the state
|
||||
changes from true to false is forwarded to the client.
|
||||
|
||||
=item C<"after"> E<mdash> only the first value received after the state
|
||||
changes from true to false is forwarded to the client.
|
||||
|
||||
=item C<"unless"> E<mdash> values are forwarded to the client as long
|
||||
as the state is false.
|
||||
|
||||
=back
|
||||
|
||||
=item State C<"s">
|
||||
|
||||
The name of a state variable, enclosed in double quotes C<">.
|
||||
|
||||
=back
|
||||
|
||||
=head4 Example
|
||||
|
||||
Woz$ camonitor 'test:channel'
|
||||
...
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
+11
-5
@@ -21,11 +21,6 @@
|
||||
|
||||
#define STATE_NAME_LENGTH 20
|
||||
|
||||
static const
|
||||
chfPluginEnumType modeEnum[] = { {"before", 0}, {"first", 1},
|
||||
{"last", 2}, {"after", 3},
|
||||
{"while", 4}, {"unless", 5},
|
||||
{NULL,0} };
|
||||
typedef enum syncMode {
|
||||
syncModeBefore=0,
|
||||
syncModeFirst=1,
|
||||
@@ -35,6 +30,17 @@ typedef enum syncMode {
|
||||
syncModeUnless=5
|
||||
} syncMode;
|
||||
|
||||
static const
|
||||
chfPluginEnumType modeEnum[] = {
|
||||
{"before", syncModeBefore},
|
||||
{"first", syncModeFirst},
|
||||
{"last", syncModeLast},
|
||||
{"after", syncModeAfter},
|
||||
{"while", syncModeWhile},
|
||||
{"unless", syncModeUnless},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
typedef struct myStruct {
|
||||
syncMode mode;
|
||||
char state[STATE_NAME_LENGTH];
|
||||
|
||||
Reference in New Issue
Block a user