ET System  16.4
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Station config

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. More...
 
int et_station_config_destroy (et_statconfig sconfig)
 This routine frees the memory allocated when a configuration is initialized by et_station_config_init(). More...
 
int et_station_config_setblock (et_statconfig sconfig, int val)
 This routine sets a station configuration's block mode. More...
 
int et_station_config_getblock (et_statconfig sconfig, int *val)
 This routine gets a station configuration's block mode. More...
 
int et_station_config_setflow (et_statconfig sconfig, int val)
 This routine sets a station configuration's flow mode. More...
 
int et_station_config_getflow (et_statconfig sconfig, int *val)
 This routine gets a station configuration's flow mode. More...
 
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. More...
 
int et_station_config_getselect (et_statconfig sconfig, int *val)
 This routine gets a station configuration's select mode. More...
 
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. More...
 
int et_station_config_getuser (et_statconfig sconfig, int *val)
 This routine gets a station configuration's user mode. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int et_station_config_setprescale (et_statconfig sconfig, int val)
 This routine sets a station configuration's prescale value. More...
 
int et_station_config_getprescale (et_statconfig sconfig, int *val)
 This routine gets a station configuration's prescale value. More...
 
int et_station_config_setselectwords (et_statconfig sconfig, int val[])
 This routine sets a station configuration's array of selection integers. More...
 
int et_station_config_getselectwords (et_statconfig sconfig, int val[])
 This routine gets a station configuration's array of selection integers. More...
 
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. More...
 
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). More...
 
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. More...
 
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). More...
 
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. More...
 
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. More...
 

Detailed Description

These routines configure the options necessary to create a station.

Function Documentation

int et_station_config_destroy ( et_statconfig  sconfig)

This routine frees the memory allocated when a configuration is initialized by et_station_config_init().

Parameters
sconfigstation configuration
Returns
ET_OK

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.

Parameters
sconfigstation configuration.
valint pointer which gets filled with either ET_STATION_BLOCKING or ET_STATION_NONBLOCKING.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setblock()

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.

Parameters
sconfigstation configuration.
valchar pointer which gets filled Java class name.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setclass()

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.

Parameters
sconfigstation configuration.
valint pointer which gets filled with queue size.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setcue()

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.

Parameters
sconfigstation configuration.
valint pointer which gets filled with either ET_STATION_SERIAL or ET_STATION_PARALLEL.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setflow()

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

Parameters
sconfigstation configuration.
valchar pointer which gets filled function name.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setfunction()

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

Parameters
sconfigstation configuration.
valchar pointer which gets filled shared library name.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setlib()

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.

Parameters
sconfigstation configuration.
valint pointer which gets filled with prescale value.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setprescale()

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.

Parameters
sconfigstation configuration.
valint pointer which gets filled with ET_STATION_RESTORE_OUT, ET_STATION_RESTORE_IN, ET_STATION_RESTORE_GC, or ET_STATION_RESTORE_REDIST.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setrestore()

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.

Parameters
sconfigstation configuration.
valint 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.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setselect()

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.

Parameters
sconfigstation configuration.
valint array with at least ET_STATION_SELECT_INTS number of elements which gets filled with selection integers.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setselectwords()

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.

Parameters
sconfigstation configuration.
valint pointer which gets filled with number of allowed simultaneous attachments where 0 (ET_STATION_USER_MULTI) means multiple.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized;
See Also
et_station_config_setuser()

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.

Parameters
sconfigpointer to an station configuration variable
Returns
ET_OK if successful.
ET_ERROR if it fails to allocate memory for configuration data storage.

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

Parameters
sconfigstation configuration.
valET_STATION_BLOCKING or ET_STATION_NONBLOCKING.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not 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.

Parameters
sconfigstation configuration.
valname of Java class.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized; if name is NULL or longer than (ET_FILENAME_LENGTH - 1).
See Also
et_station_config_setselect()

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.

Parameters
sconfigstation configuration.
valqueue size of any positive integer.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not positive.

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.

Parameters
sconfigstation configuration.
valET_STATION_SERIAL or ET_STATION_PARALLEL.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not ET_STATION_BLOCKING or ET_STATION_NONBLOCKING.

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.

Parameters
sconfigstation configuration.
valname of user-defined function in shared library.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized; if name is NULL or longer than (ET_FUNCNAME_LENGTH - 1).
See Also
et_station_config_setselect()

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.

Parameters
sconfigstation configuration.
valname of shared library.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized; if name is NUL or longer than (ET_FILENAME_LENGTH - 1).
See Also
et_station_config_setselect()

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.

Parameters
sconfigstation configuration.
valprescale value of any positive integer.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not positive.

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.

Parameters
sconfigstation configuration.
valET_STATION_RESTORE_OUT, ET_STATION_RESTORE_IN, ET_STATION_RESTORE_GC, or ET_STATION_RESTORE_REDIST.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not 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.

  • The value ET_STATION_SELECT_EQUALCUE only applies to parallel stations and results in a distribution of events between all parallel stations in the same group such that all input lists contain the same number of events (load distribution).
Parameters
sconfigstation configuration.
valET_STATION_SELECT_ALL, ET_STATION_SELECT_USER, ET_STATION_SELECT_MATCH, ET_STATION_SELECT_RROBIN, or ET_STATION_SELECT_EQUALCUE.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not 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.

Parameters
sconfigstation configuration.
valint array with at least ET_STATION_SELECT_INTS number of elements.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized.
See Also
et_station_config_setselect()

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.

Parameters
sconfigstation configuration.
valET_STATION_USER_MULTI or ET_STATION_USER_SINGLE.
Returns
ET_OK if successful.
ET_ERROR if sconfig is NULL or was not initialized; if val is not ET_STATION_USER_MULTI, ET_STATION_USER_SINGLE, or positive int,

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_stat_config_t::init, and et_stat_config_t::user_mode.