EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Attributes | List of all members
chFilterIf Struct Reference

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 NULL pointer to the parsing handler for that value type, which is equivalent to a routine that always returns parse_stop.

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...
 

Detailed Description

Routines to be implemented by each Channel Filter.

Definition at line 123 of file dbChannel.h.

Member Data Documentation

void(* chFilterIf::priv_free)(void *puser)

Called during database shutdown to release resources allocated by the filter.

Parameters
puserThe user-pointer passed into dbRegisterFilter().

Definition at line 130 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.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 149 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.

Parameters
filterPointer to instance data.

Definition at line 157 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.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 167 of file dbChannel.h.

parse_result(* chFilterIf::parse_null)(chFilter *filter)

Optional. Null values are rarely accepted by channel filters.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 176 of file dbChannel.h.

parse_result(* chFilterIf::parse_boolean)(chFilter *filter, int boolVal)

Optional.

Parameters
filterPointer to instance data.
boolValtrue/false Value.
Returns
parse_stop on error, or parse_continue

Definition at line 185 of file dbChannel.h.

parse_result(* chFilterIf::parse_integer)(chFilter *filter, long integerVal)

Optional.

Parameters
filterPointer to instance data.
integerValValue.
Returns
parse_stop on error, or parse_continue

Definition at line 194 of file dbChannel.h.

parse_result(* chFilterIf::parse_double)(chFilter *filter, double doubleVal)

Optional.

Parameters
filterPointer to instance data.
doubleValValue.
Returns
parse_stop on error, or parse_continue

Definition at line 203 of file dbChannel.h.

parse_result(* chFilterIf::parse_string)(chFilter *filter, const char *stringVal, size_t stringLen)

Optional.

Parameters
filterPointer to instance data.
stringValValue, not zero-terminated.
stringLenNumber of chars in stringVal.
Returns
parse_stop on error, or parse_continue

Definition at line 213 of file dbChannel.h.

parse_result(* chFilterIf::parse_start_map)(chFilter *filter)

Optional. Inside a JSON map all data consists of key/value pairs.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 223 of file dbChannel.h.

parse_result(* chFilterIf::parse_map_key)(chFilter *filter, const char *key, size_t stringLen)

Optional.

Parameters
filterPointer to instance data.
keyValue not zero-terminated.
stringLenNumber of chars in key
Returns
parse_stop on error, or parse_continue

Definition at line 233 of file dbChannel.h.

parse_result(* chFilterIf::parse_end_map)(chFilter *filter)

Optional.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 242 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.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 251 of file dbChannel.h.

parse_result(* chFilterIf::parse_end_array)(chFilter *filter)

Optional.

Parameters
filterPointer to instance data.
Returns
parse_stop on error, or parse_continue

Definition at line 259 of file dbChannel.h.

long(* chFilterIf::channel_open)(chFilter *filter)

Optional, initialize instance.

Parameters
filterPointer to instance data.
Returns
0, or an error status value.

Definition at line 269 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.

Parameters
[in]filterPointer to instance data.
[out]cb_outWrite filter function pointer here.
[out]arg_outWrite private data pointer here.
[in,out]probedb_field_log with metadata for adjusting.

Definition at line 280 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.

Parameters
[in]filterPointer to instance data.
[out]cb_outWrite filter function pointer here.
[out]arg_outWrite private data pointer here.
[in,out]probedb_field_log with metadata for adjusting.

Definition at line 291 of file dbChannel.h.

void(* chFilterIf::channel_report)(chFilter *filter, int level, const unsigned short indent)

Optional.

Parameters
filterPointer to instance data.
levelHigher levels may provide more detail.
indentIndent all lines by this many spaces.

Definition at line 301 of file dbChannel.h.

void(* chFilterIf::channel_close)(chFilter *filter)

Optional, releases resources allocated for this instance.

Parameters
filterPointer to instance data.

Definition at line 309 of file dbChannel.h.


The documentation for this struct was generated from the following file: