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

These routines are called by the ET system user in order to get or modify parameters of the ET system itself. More...

Functions

int et_system_setgroup (et_sys_id id, int group)
 This routine sets the default group number of the ET client. More...
 
int et_system_getgroup (et_sys_id id, int *group)
 This routine gets the default group number of the ET client. More...
 
int et_system_setdebug (et_sys_id id, int debug)
 This routine sets the level of debug output for the ET client. More...
 
int et_system_getdebug (et_sys_id id, int *debug)
 This routine gets the level of debug output for the ET client. More...
 
int et_system_getlocality (et_sys_id id, int *locality)
 This routine gets the locality of the ET client. More...
 
int et_system_getnumevents (et_sys_id id, int *numevents)
 This routine gets the number of events in the ET system. More...
 
int et_system_geteventsize (et_sys_id id, size_t *eventsize)
 This routine gets the size of an event in bytes in the ET system. More...
 
int et_system_gettempsmax (et_sys_id id, int *tempsmax)
 This routine gets the maximum number of temporary events allowed in the ET system. More...
 
int et_system_getstationsmax (et_sys_id id, int *stationsmax)
 This routine gets the maximum number of stations allowed in the ET system. More...
 
int et_system_getprocsmax (et_sys_id id, int *procsmax)
 This routine gets the maximum number of local processes that are allowed to open the ET system. More...
 
int et_system_getattsmax (et_sys_id id, int *attsmax)
 This routine gets the maximum number of attachments that are allowed to be made to the ET system. More...
 
int et_system_getheartbeat (et_sys_id id, int *heartbeat)
 This routine gets the current value of the heartbeat of the ET system. More...
 
int et_system_getpid (et_sys_id id, pid_t *pid)
 This routine gets the unix process id of the ET system process. More...
 
int et_system_getprocs (et_sys_id id, int *procs)
 This routine gets the number of local processes that have opened the ET system. More...
 
int et_system_getattachments (et_sys_id id, int *atts)
 This routine gets the number of attachments that have been made to the ET system. More...
 
int et_system_getstations (et_sys_id id, int *stations)
 This routine gets the number of stations in the ET system. More...
 
int et_system_gettemps (et_sys_id id, int *temps)
 This routine gets the number of temporary events currently in the ET system. More...
 
int et_system_getserverport (et_sys_id id, int *port)
 This routine gets the TCP listening port number of the ET system. More...
 
int et_system_gethost (et_sys_id id, char *host)
 This routine gets the host of the ET system. More...
 
int et_system_getlocaladdress (et_sys_id id, char *address)
 This routine gets the local IP address, if any, used to connect remotely to the ET system. More...
 

Detailed Description

These routines are called by the ET system user in order to get or modify parameters of the ET system itself.

Function Documentation

int et_system_getattachments ( et_sys_id  id,
int *  atts 
)

This routine gets the number of attachments that have been made to the ET system.

Parameters
idsystem id.
attsint pointer which gets filled with the number of attachments.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getattachments(), et_id_t::init, et_id_t::locality, et_system_t::nattachments, and et_id_t::sys.

int et_system_getattsmax ( et_sys_id  id,
int *  attsmax 
)

This routine gets the maximum number of attachments that are allowed to be made to the ET system.

Parameters
idsystem id.
attsmaxint pointer which gets filled with the maximum number of attachments allowed.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References et_system_t::config, ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getattsmax(), et_id_t::init, et_id_t::locality, et_sys_config_t::nattachments, and et_id_t::sys.

int et_system_getdebug ( et_sys_id  id,
int *  debug 
)

This routine gets the level of debug output for the ET client.

Parameters
idsystem id.
debugint pointer which gets filled with the debug output level which may be one of ET_DEBUG_NONE, ET_DEBUG_SEVERE, ET_DEBUG_ERROR, ET_DEBUG_WARN, or ET_DEBUG_INFO.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
See Also
et_system_setdebug.

References et_id_t::debug, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_id_t::init.

int et_system_geteventsize ( et_sys_id  id,
size_t *  eventsize 
)

This routine gets the size of an event in bytes in the ET system.

Parameters
idsystem id.
eventsizepointer which gets filled with the size of an event.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.

References et_id_t::esize, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_id_t::init.

int et_system_getgroup ( et_sys_id  id,
int *  group 
)

This routine gets the default group number of the ET client.

Parameters
sconfigsystem id.
groupint pointer which gets filled with the default group number.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
See Also
et_system_setgroup.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_id_t::group, and et_id_t::init.

int et_system_getheartbeat ( et_sys_id  id,
int *  heartbeat 
)

This routine gets the current value of the heartbeat of the ET system.

For a healthy C-based system, this value changes every heartbeat period (1/2 sec). If the system is Java-based, this call is meaningless and returns a value of 0.

Parameters
idsystem id.
heartbeatint pointer which gets filled with the ET system heartbeat.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getheartbeat(), et_system_t::heartbeat, et_id_t::init, et_id_t::locality, and et_id_t::sys.

int et_system_gethost ( et_sys_id  id,
char *  host 
)

This routine gets the host of the ET system.

To be safe the array should be at least {ET_MAXHOSTNAMELEN} characters long.

Parameters
sconfigsystem configuration.
hostpointer which gets filled with the system's host.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_id_t::ethost, and et_id_t::init.

int et_system_getlocaladdress ( et_sys_id  id,
char *  address 
)

This routine gets the local IP address, if any, used to connect remotely to the ET system.

The array must be at least {ET_IPADDRSTRLEN} characters long.

Parameters
sconfigsystem configuration.
addresspointer which gets filled with the local IP address used to connect remotely to the ET system.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_id_t::init, and et_id_t::localAddr.

int et_system_getlocality ( et_sys_id  id,
int *  locality 
)

This routine gets the locality of the ET client.

A return value of ET_REMOTE indicates it's on a different host, ET_LOCAL if it's on the same host, or ET_LOCAL_NOSHARE if it's on the same host but unable to share pthread mutexes with the ET system.

Parameters
idsystem id.
localityint pointer which gets filled with the locality value which may be one of ET_LOCAL, ET_REMOTE, or ET_LOCAL_NOSHARE.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_id_t::init, and et_id_t::locality.

int et_system_getnumevents ( et_sys_id  id,
int *  numevents 
)

This routine gets the number of events in the ET system.

Parameters
idsystem id.
numeventsint pointer which gets filled with the number of events.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_id_t::init, and et_id_t::nevents.

int et_system_getpid ( et_sys_id  id,
pid_t *  pid 
)

This routine gets the unix process id of the ET system process.

If the ET system is Java-based, this call is meaningless and returns a value of -1.

Parameters
idsystem id.
pidpointer which gets filled with the unix process id of the ET system process.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getpid(), et_id_t::init, et_id_t::locality, et_system_t::mainpid, and et_id_t::sys.

int et_system_getprocs ( et_sys_id  id,
int *  procs 
)

This routine gets the number of local processes that have opened the ET system.

If the system is Java-based, this call is meaningless and returns a value of 0 since there is no shared memory.

Parameters
idsystem id.
procsint pointer which gets filled with the number of local processes that called et_open.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getprocs(), et_id_t::init, et_id_t::locality, et_system_t::nprocesses, and et_id_t::sys.

int et_system_getprocsmax ( et_sys_id  id,
int *  procsmax 
)

This routine gets the maximum number of local processes that are allowed to open the ET system.

If the system is Java-based, this call is meaningless and returns a value of 0 since there is no shared memory.

Parameters
idsystem id.
procsmaxint pointer which gets filled with the maximum number of local processes allowed.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References et_system_t::config, ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getprocsmax(), et_id_t::init, et_id_t::locality, et_sys_config_t::nprocesses, and et_id_t::sys.

int et_system_getserverport ( et_sys_id  id,
int *  port 
)

This routine gets the TCP listening port number of the ET system.

Parameters
sconfigsystem configuration.
portint pointer which gets filled with the system's TCP listening port.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_id_t::init, and et_id_t::port.

int et_system_getstations ( et_sys_id  id,
int *  stations 
)

This routine gets the number of stations in the ET system.

Parameters
idsystem id.
stationsint pointer which gets filled with the number of stations.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getstations(), et_id_t::init, et_id_t::locality, et_system_t::nstations, and et_id_t::sys.

int et_system_getstationsmax ( et_sys_id  id,
int *  stationsmax 
)

This routine gets the maximum number of stations allowed in the ET system.

Parameters
idsystem id.
stationsmaxint pointer which gets filled with the maximum number of stations allowed.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References et_system_t::config, ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getstationsmax(), et_id_t::init, et_id_t::locality, et_sys_config_t::nstations, and et_id_t::sys.

int et_system_gettemps ( et_sys_id  id,
int *  temps 
)

This routine gets the number of temporary events currently in the ET system.

If the system is Java-based, this call is meaningless and returns a value of 0 since there is no shared memory and no temp events.

Parameters
idsystem id.
tempsint pointer which gets filled with the number of temporary events.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_gettemps(), et_id_t::init, et_id_t::locality, et_system_t::ntemps, and et_id_t::sys.

int et_system_gettempsmax ( et_sys_id  id,
int *  tempsmax 
)

This routine gets the maximum number of temporary events allowed in the ET system.

If the system is Java-based, this call is meaningless and returns a value of 0 since there is no shared memory and no temp events.

Parameters
idsystem id.
tempsmaxint pointer which gets filled with the maximum number of temporary events allowed.
Returns
ET_OK if successful.
ET_ERROR if either arg is NULL or id not initialized.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References et_system_t::config, ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_gettempsmax(), et_id_t::init, et_id_t::locality, et_sys_config_t::ntemps, and et_id_t::sys.

int et_system_setdebug ( et_sys_id  id,
int  debug 
)

This routine sets the level of debug output for the ET client.

The allowed values are:

Parameters
idsystem id.
debuglevel of debug output which may be one of ET_DEBUG_NONE, ET_DEBUG_SEVERE, ET_DEBUG_ERROR, ET_DEBUG_WARN, or ET_DEBUG_INFO.
Returns
ET_OK if successful.
ET_ERROR if id is NULL or not initialized; if debug is not one of the allowed values.

References et_id_t::debug, ET_DEBUG_ERROR, ET_DEBUG_INFO, ET_DEBUG_NONE, ET_DEBUG_SEVERE, ET_DEBUG_WARN, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_id_t::init.

Referenced by et_open().

int et_system_setgroup ( et_sys_id  id,
int  group 
)

This routine sets the default group number of the ET client.

When the group is set to 0, calls to et_event_new or et_events_new gets events of any group. When the group number is set to a positive number, the same calls only get events from the given group.

Parameters
sconfigsystem id.
valET system file name.
Returns
ET_OK if successful.
ET_ERROR if id is NULL or not initialized; if group < 0 or > # of groups; if remote communication error.
ET_ERROR_READ if network communication reading problem.
ET_ERROR_WRITE if network communication writing problem.

References et_system_t::config, ET_ERROR, ET_LOCAL, ET_OK, ET_STRUCT_OK, etr_system_getgroupcount(), et_id_t::group, et_sys_config_t::groupCount, et_id_t::init, et_id_t::locality, and et_id_t::sys.