EPICS Base
7.0.7.0
|
Channel Filter Interface. More...
#include <dbChannel.h>
Public Attributes | |
void(* | priv_free )(void *puser) |
Release private filter data. More... | |
Parsing event handlers | |
A filter that doesn't accept a particular JSON value type may use a | |
parse_result(* | parse_start )(chFilter *filter) |
Create new filter instance. More... | |
void(* | parse_abort )(chFilter *filter) |
Parsing of filter instance is being cancelled. More... | |
parse_result(* | parse_end )(chFilter *filter) |
Parsing of filter instance has completed successfully. More... | |
parse_result(* | parse_null )(chFilter *filter) |
Parser saw null value. More... | |
parse_result(* | parse_boolean )(chFilter *filter, int boolVal) |
Parser saw boolean value. More... | |
parse_result(* | parse_integer )(chFilter *filter, long integerVal) |
Parser saw integer value. More... | |
parse_result(* | parse_double )(chFilter *filter, double doubleVal) |
Parser saw double value. More... | |
parse_result(* | parse_string )(chFilter *filter, const char *stringVal, size_t stringLen) |
Parser saw string value. More... | |
parse_result(* | parse_start_map )(chFilter *filter) |
Parser saw start of a JSON map value. More... | |
parse_result(* | parse_map_key )(chFilter *filter, const char *key, size_t stringLen) |
Parser saw a JSON map key. More... | |
parse_result(* | parse_end_map )(chFilter *filter) |
Parser saw end of a JSON map value. More... | |
parse_result(* | parse_start_array )(chFilter *filter) |
Parser saw start of a JSON array value. More... | |
parse_result(* | parse_end_array )(chFilter *filter) |
Parser saw end of a JSON array value. More... | |
Channel operations | |
long(* | channel_open )(chFilter *filter) |
Open filter on channel. More... | |
void(* | channel_register_pre )(chFilter *filter, chPostEventFunc **cb_out, void **arg_out, db_field_log *probe) |
Get pre-chain filter function. More... | |
void(* | channel_register_post )(chFilter *filter, chPostEventFunc **cb_out, void **arg_out, db_field_log *probe) |
Get post-chain filter function. More... | |
void(* | channel_report )(chFilter *filter, int level, const unsigned short indent) |
Print information about filter to stdout. More... | |
void(* | channel_close )(chFilter *filter) |
Close filter. More... | |
Routines to be implemented by each Channel Filter.
Definition at line 108 of file dbChannel.h.
void(* chFilterIf::priv_free)(void *puser) |
Called during database shutdown to release resources allocated by the filter.
puser | The user-pointer passed into dbRegisterFilter(). |
Definition at line 115 of file dbChannel.h.
parse_result(* chFilterIf::parse_start)(chFilter *filter) |
Called when a new filter instance is requested. Filter may allocate resources for this instance and store in filter->puser
. If parse_start() returns parse_continue
for a filter, one of parse_abort() or parse_end() will later be called for that same filter.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 134 of file dbChannel.h.
void(* chFilterIf::parse_abort)(chFilter *filter) |
This function should release any memory allocated for the given filter
instance; no further parsing handlers will be called for it.
filter | Pointer to instance data. |
Definition at line 142 of file dbChannel.h.
parse_result(* chFilterIf::parse_end)(chFilter *filter) |
The parser has reached the end of this instance and no further parsing handlers will be called for it. The filter must check the instance data and indicate whether it was complete or not.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 152 of file dbChannel.h.
parse_result(* chFilterIf::parse_null)(chFilter *filter) |
Optional. Null values are rarely accepted by channel filters.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 161 of file dbChannel.h.
parse_result(* chFilterIf::parse_boolean)(chFilter *filter, int boolVal) |
Optional.
filter | Pointer to instance data. |
boolVal | true/false Value. |
parse_stop
on error, or parse_continue
Definition at line 170 of file dbChannel.h.
parse_result(* chFilterIf::parse_integer)(chFilter *filter, long integerVal) |
Optional.
filter | Pointer to instance data. |
integerVal | Value. |
parse_stop
on error, or parse_continue
Definition at line 179 of file dbChannel.h.
parse_result(* chFilterIf::parse_double)(chFilter *filter, double doubleVal) |
Optional.
filter | Pointer to instance data. |
doubleVal | Value. |
parse_stop
on error, or parse_continue
Definition at line 188 of file dbChannel.h.
parse_result(* chFilterIf::parse_string)(chFilter *filter, const char *stringVal, size_t stringLen) |
Optional.
filter | Pointer to instance data. |
stringVal | Value, not zero-terminated. |
stringLen | Number of chars in stringVal . |
parse_stop
on error, or parse_continue
Definition at line 198 of file dbChannel.h.
parse_result(* chFilterIf::parse_start_map)(chFilter *filter) |
Optional. Inside a JSON map all data consists of key/value pairs.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 208 of file dbChannel.h.
parse_result(* chFilterIf::parse_map_key)(chFilter *filter, const char *key, size_t stringLen) |
Optional.
filter | Pointer to instance data. |
key | Value not zero-terminated. |
stringLen | Number of chars in key |
parse_stop
on error, or parse_continue
Definition at line 218 of file dbChannel.h.
parse_result(* chFilterIf::parse_end_map)(chFilter *filter) |
Optional.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 227 of file dbChannel.h.
parse_result(* chFilterIf::parse_start_array)(chFilter *filter) |
Optional. Data inside a JSON array doesn't have to be all of the same type.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 236 of file dbChannel.h.
parse_result(* chFilterIf::parse_end_array)(chFilter *filter) |
Optional.
filter | Pointer to instance data. |
parse_stop
on error, or parse_continue
Definition at line 244 of file dbChannel.h.
long(* chFilterIf::channel_open)(chFilter *filter) |
Optional, initialize instance.
filter | Pointer to instance data. |
Definition at line 254 of file dbChannel.h.
void(* chFilterIf::channel_register_pre)(chFilter *filter, chPostEventFunc **cb_out, void **arg_out, db_field_log *probe) |
Optional. Returns pre-chain filter function and context.
[in] | filter | Pointer to instance data. |
[out] | cb_out | Write filter function pointer here. |
[out] | arg_out | Write private data pointer here. |
[in,out] | probe | db_field_log with metadata for adjusting. |
Definition at line 265 of file dbChannel.h.
void(* chFilterIf::channel_register_post)(chFilter *filter, chPostEventFunc **cb_out, void **arg_out, db_field_log *probe) |
Optional, return post-chain filter function and context.
[in] | filter | Pointer to instance data. |
[out] | cb_out | Write filter function pointer here. |
[out] | arg_out | Write private data pointer here. |
[in,out] | probe | db_field_log with metadata for adjusting. |
Definition at line 276 of file dbChannel.h.
void(* chFilterIf::channel_report)(chFilter *filter, int level, const unsigned short indent) |
Optional.
filter | Pointer to instance data. |
level | Higher levels may provide more detail. |
indent | Indent all lines by this many spaces. |
Definition at line 286 of file dbChannel.h.
void(* chFilterIf::channel_close)(chFilter *filter) |
Optional, releases resources allocated for this instance.
filter | Pointer to instance data. |
Definition at line 294 of file dbChannel.h.