These routines configure the options necessary to create a station. More...
Functions | |
int | et_station_config_init (et_statconfig *sconfig) |
This routine initializes a configuration used to create a station in the ET system. | |
int | et_station_config_destroy (et_statconfig sconfig) |
This routine frees the memory allocated when a configuration is initialized by et_station_config_init(). | |
int | et_station_config_setblock (et_statconfig sconfig, int val) |
This routine sets a station configuration's block mode. | |
int | et_station_config_getblock (et_statconfig sconfig, int *val) |
This routine gets a station configuration's block mode. | |
int | et_station_config_setflow (et_statconfig sconfig, int val) |
This routine sets a station configuration's flow mode. | |
int | et_station_config_getflow (et_statconfig sconfig, int *val) |
This routine gets a station configuration's flow mode. | |
int | et_station_config_setselect (et_statconfig sconfig, int val) |
This routine sets a station configuration's select mode which determines the algorithm this station uses to decide which events to let into its input list. | |
int | et_station_config_getselect (et_statconfig sconfig, int *val) |
This routine gets a station configuration's select mode. | |
int | et_station_config_setuser (et_statconfig sconfig, int val) |
This routine sets a station configuration's user mode which is the maximum number of users which may simultaneously attach to the station. | |
int | et_station_config_getuser (et_statconfig sconfig, int *val) |
This routine gets a station configuration's user mode. | |
int | et_station_config_setrestore (et_statconfig sconfig, int val) |
This routine sets a station configuration's restore mode which determines where events go when the attachment that owns those events detaches from the station. | |
int | et_station_config_getrestore (et_statconfig sconfig, int *val) |
This routine gets a station configuration's restore mode which determines where events go when the attachment who owns those events detaches from the station. | |
int | et_station_config_setcue (et_statconfig sconfig, int val) |
This routine sets a station configuration's queue size which is the max number of events allowed in the input list when the station is nonblocking. | |
int | et_station_config_getcue (et_statconfig sconfig, int *val) |
This routine gets a station configuration's queue size which is the max number of events allowed in the input list when the station is nonblocking. | |
int | et_station_config_setprescale (et_statconfig sconfig, int val) |
This routine sets a station configuration's prescale value. | |
int | et_station_config_getprescale (et_statconfig sconfig, int *val) |
This routine gets a station configuration's prescale value. | |
int | et_station_config_setselectwords (et_statconfig sconfig, int val[]) |
This routine sets a station configuration's array of selection integers. | |
int | et_station_config_getselectwords (et_statconfig sconfig, int val[]) |
This routine gets a station configuration's array of selection integers. | |
int | et_station_config_setfunction (et_statconfig sconfig, const char *val) |
This routine sets a station configuration's name of the user-defined function which is loaded from a shared library and used for selecting events. | |
int | et_station_config_getfunction (et_statconfig sconfig, char *val) |
This routine gets a station configuration's name of the user-defined function which is loaded from a shared library and used for selecting events (may be NULL). | |
int | et_station_config_setlib (et_statconfig sconfig, const char *val) |
This routine sets a station configuration's name of the shared library which is used for loading a user's function to select events. | |
int | et_station_config_getlib (et_statconfig sconfig, char *val) |
This routine gets a station configuration's name of the shared library which is used for loading a user's function to select events (may be NULL). | |
int | et_station_config_setclass (et_statconfig sconfig, const char *val) |
This routine sets a station configuration's name of the Java class which is used for loading a user's function to select events. | |
int | et_station_config_getclass (et_statconfig sconfig, char *val) |
This routine gets a station configuration's name of the Java class which is used for loading a user's function to select events. |
These routines configure the options necessary to create a station.
int et_station_config_destroy | ( | et_statconfig | sconfig | ) |
This routine frees the memory allocated when a configuration is initialized by et_station_config_init().
sconfig | station configuration |
References ET_OK.
Referenced by et_station_create_at().
int et_station_config_getblock | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's block mode.
sconfig | station configuration. | |
val | int pointer which gets filled with either ET_STATION_BLOCKING or ET_STATION_NONBLOCKING. |
References et_stat_config_t::block_mode, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_stat_config_t::init.
int et_station_config_getclass | ( | et_statconfig | sconfig, | |
char * | val | |||
) |
This routine gets a station configuration's name of the Java class which is used for loading a user's function to select events.
(may be NULL). It is only meaningful when creating a station in a Java-based ET system.
sconfig | station configuration. | |
val | char pointer which gets filled Java class name. |
References et_stat_config_t::classs, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_stat_config_t::init.
int et_station_config_getcue | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's queue size which is the max number of events allowed in the input list when the station is nonblocking.
sconfig | station configuration. | |
val | int pointer which gets filled with queue size. |
References et_stat_config_t::cue, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_stat_config_t::init.
int et_station_config_getflow | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's flow mode.
sconfig | station configuration. | |
val | int pointer which gets filled with either ET_STATION_SERIAL or ET_STATION_PARALLEL. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::flow_mode, and et_stat_config_t::init.
int et_station_config_getfunction | ( | et_statconfig | sconfig, | |
char * | val | |||
) |
This routine gets a station configuration's name of the user-defined function which is loaded from a shared library and used for selecting events (may be NULL).
sconfig | station configuration. | |
val | char pointer which gets filled function name. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::fname, and et_stat_config_t::init.
int et_station_config_getlib | ( | et_statconfig | sconfig, | |
char * | val | |||
) |
This routine gets a station configuration's name of the shared library which is used for loading a user's function to select events (may be NULL).
sconfig | station configuration. | |
val | char pointer which gets filled shared library name. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::lib.
int et_station_config_getprescale | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's prescale value.
sconfig | station configuration. | |
val | int pointer which gets filled with prescale value. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::prescale.
int et_station_config_getrestore | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's restore mode which determines where events go when the attachment who owns those events detaches from the station.
sconfig | station configuration. | |
val | int pointer which gets filled with ET_STATION_RESTORE_OUT, ET_STATION_RESTORE_IN, ET_STATION_RESTORE_GC, or ET_STATION_RESTORE_REDIST. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::restore_mode.
int et_station_config_getselect | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's select mode.
sconfig | station configuration. | |
val | int pointer which gets filled with ET_STATION_SELECT_ALL, ET_STATION_SELECT_USER, ET_STATION_SELECT_MATCH, ET_STATION_SELECT_RROBIN, or ET_STATION_SELECT_EQUALCUE. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::select_mode.
int et_station_config_getselectwords | ( | et_statconfig | sconfig, | |
int | val[] | |||
) |
This routine gets a station configuration's array of selection integers.
sconfig | station configuration. | |
val | int array with at least ET_STATION_SELECT_INTS number of elements which gets filled with selection integers. |
References ET_ERROR, ET_OK, ET_STATION_SELECT_INTS, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::select.
int et_station_config_getuser | ( | et_statconfig | sconfig, | |
int * | val | |||
) |
This routine gets a station configuration's user mode.
sconfig | station configuration. | |
val | int pointer which gets filled with number of allowed simultaneous attachments where 0 (ET_STATION_USER_MULTI) means multiple. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::user_mode.
int et_station_config_init | ( | et_statconfig * | sconfig | ) |
This routine initializes a configuration used to create a station in the ET system.
This MUST be done prior to setting any configuration parameters or all setting routines will return an error.
sconfig | pointer to an station configuration variable |
References et_stat_config_t::block_mode, et_stat_config_t::classs, et_stat_config_t::cue, ET_ERROR, ET_OK, ET_STATION_BLOCKING, ET_STATION_CUE, ET_STATION_PRESCALE, ET_STATION_RESTORE_OUT, ET_STATION_SELECT_ALL, ET_STATION_SELECT_INTS, ET_STATION_SERIAL, ET_STATION_USER_MULTI, ET_STRUCT_OK, et_stat_config_t::flow_mode, et_stat_config_t::fname, et_stat_config_t::init, et_stat_config_t::lib, et_stat_config_t::prescale, et_stat_config_t::restore_mode, et_stat_config_t::select, et_stat_config_t::select_mode, and et_stat_config_t::user_mode.
Referenced by et_station_create_at().
int et_station_config_setblock | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's block mode.
Determines whether all events pass through the station (ET_STATION_BLOCKING) which is the default or whether only a fixed size cue of events is filled while all others by-pass the station (ET_STATION_NONBLOCKING).
sconfig | station configuration. | |
val | ET_STATION_BLOCKING or ET_STATION_NONBLOCKING. |
References et_stat_config_t::block_mode, ET_ERROR, ET_OK, ET_STATION_BLOCKING, ET_STATION_NONBLOCKING, ET_STRUCT_OK, and et_stat_config_t::init.
int et_station_config_setclass | ( | et_statconfig | sconfig, | |
const char * | val | |||
) |
This routine sets a station configuration's name of the Java class which is used for loading a user's function to select events.
This is used with the select mode value of ET_STATION_SELECT_USER. It is only meaningful when creating a station in a Java-based ET system.
sconfig | station configuration. | |
val | name of Java class. |
References et_stat_config_t::classs, ET_ERROR, ET_FILENAME_LENGTH, ET_OK, ET_STRUCT_OK, and et_stat_config_t::init.
int et_station_config_setcue | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's queue size which is the max number of events allowed in the input list when the station is nonblocking.
If the size of the queue exceeds the total number of events in the system, it is set to that limit when the station is created. Take notice that setting the size of the queue to the total # of events will, in essence, change the station into one which blocks (block mode of ). The reason for this is that all events will now pass through this station.
sconfig | station configuration. | |
val | queue size of any positive integer. |
References et_stat_config_t::cue, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_stat_config_t::init.
int et_station_config_setflow | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's flow mode.
Determines whether this station is treated independently of all other stations and every event is examined for possible placement into it (ET_STATION_SERIAL) which is the default, or whether this station is grouped together with other stations into a group of parallel stations (ET_STATION_PARALLEL). Within a single group of parallel stations, events may be distributed in a round-robin or load-distributed manner.
sconfig | station configuration. | |
val | ET_STATION_SERIAL or ET_STATION_PARALLEL. |
References ET_ERROR, ET_OK, ET_STATION_PARALLEL, ET_STATION_SERIAL, ET_STRUCT_OK, et_stat_config_t::flow_mode, and et_stat_config_t::init.
int et_station_config_setfunction | ( | et_statconfig | sconfig, | |
const char * | val | |||
) |
This routine sets a station configuration's name of the user-defined function which is loaded from a shared library and used for selecting events.
This is used with the select mode value of ET_STATION_SELECT_USER.
sconfig | station configuration. | |
val | name of user-defined function in shared library. |
References ET_ERROR, ET_FUNCNAME_LENGTH, ET_OK, ET_STRUCT_OK, et_stat_config_t::fname, and et_stat_config_t::init.
int et_station_config_setlib | ( | et_statconfig | sconfig, | |
const char * | val | |||
) |
This routine sets a station configuration's name of the shared library which is used for loading a user's function to select events.
This is used with the select mode value of ET_STATION_SELECT_USER.
sconfig | station configuration. | |
val | name of shared library. |
References ET_ERROR, ET_FILENAME_LENGTH, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::lib.
int et_station_config_setprescale | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's prescale value.
The prescale is 1 by default and selects every Nth event into the input list out of the normally accepted events.
sconfig | station configuration. | |
val | prescale value of any positive integer. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::prescale.
int et_station_config_setrestore | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's restore mode which determines where events go when the attachment that owns those events detaches from the station.
The value may be ET_STATION_RESTORE_OUT which places events in this station's output list, The value may be ET_STATION_RESTORE_IN which places events in this station's input list - unless there are no more attachments in which case they go to the output list. The value may be ET_STATION_RESTORE_GC which places events in Grand Central's input list. The value may be ET_STATION_RESTORE_REDIST which places events in the previous station's output list for redistribution among a group of parallel stations.
sconfig | station configuration. | |
val | ET_STATION_RESTORE_OUT, ET_STATION_RESTORE_IN, ET_STATION_RESTORE_GC, or ET_STATION_RESTORE_REDIST. |
References ET_ERROR, ET_OK, ET_STATION_RESTORE_GC, ET_STATION_RESTORE_IN, ET_STATION_RESTORE_OUT, ET_STATION_RESTORE_REDIST, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::restore_mode.
int et_station_config_setselect | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's select mode which determines the algorithm this station uses to decide which events to let into its input list.
The value ET_STATION_SELECT_ALL allows all events in.
The value ET_STATION_SELECT_USER indicates a user-provided function will decide.
The value ET_STATION_SELECT_MATCH uses a built-in algorithm. To understand what this algorithm does, one must realize that each event has an array of integers associated with it - metadata which can be set by the user. Likewise, each station has a corresponding array of integers of the same size associated with it - again, metadata which can be set by the user. The function compares each element of the 2 arrays together and ORs the results. The first elements are checked for equality, the second elements with a bitwise AND, the third for equality, the fourth with a bitwise AND etc., etc. If the result is 1 or true, then the event is accepted into the input list.
The value ET_STATION_SELECT_RROBIN only applies to parallel stations and results in a round-robin distribution of events between all parallel stations in the same group.
sconfig | station configuration. | |
val | ET_STATION_SELECT_ALL, ET_STATION_SELECT_USER, ET_STATION_SELECT_MATCH, ET_STATION_SELECT_RROBIN, or ET_STATION_SELECT_EQUALCUE. |
References ET_ERROR, ET_OK, ET_STATION_SELECT_ALL, ET_STATION_SELECT_EQUALCUE, ET_STATION_SELECT_MATCH, ET_STATION_SELECT_RROBIN, ET_STATION_SELECT_USER, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::select_mode.
int et_station_config_setselectwords | ( | et_statconfig | sconfig, | |
int | val[] | |||
) |
This routine sets a station configuration's array of selection integers.
These integers are used to filter events out of the station when the station config's select mode is set to ET_STATION_SELECT_MATCH. This may also be true if set to the ET_STATION_SELECT_USER mode but that depends on the user's specific filtering routine.
sconfig | station configuration. | |
val | int array with at least ET_STATION_SELECT_INTS number of elements. |
References ET_ERROR, ET_OK, ET_STATION_SELECT_INTS, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::select.
int et_station_config_setuser | ( | et_statconfig | sconfig, | |
int | val | |||
) |
This routine sets a station configuration's user mode which is the maximum number of users which may simultaneously attach to the station.
Value may be ET_STATION_USER_SINGLE for only 1 user, or ET_STATION_USER_MULTI for multiple users, or may be set to a specific positive integer for only that many simultaneous attachments.
sconfig | station configuration. | |
val | ET_STATION_USER_MULTI or ET_STATION_USER_SINGLE. |
References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::user_mode.