PreviousNext

Useful Macros

General

String Lengths

·         ET_FILENAME_LENGTH - maximum length of ET system file name + 1

·         ET_FUNCNAME_LENGTH - maximum length of user's event selection function name

·         ET_STATNAME_LENGTH - maximum length of station name

System Defaults

·         ET_SYSTEM_EVENTS - default number of events in a system (300)

·         ET_SYSTEM_NTEMPS - default maximum number of temporary events in a system (300)

·         ET_SYSTEM_ESIZE - default size of normal events in bytes (1000)

·         ET_SYSTEM_NSTATS - default maximum number of stations in a system (200)

Errors

·         ET_OK - error status of ok

·         ET_ERROR - error status of error

·         ET_ERROR_CLOSED et_close() has already been called, id is no longer valid

·         ET_ERROR_TOOMANY - error status of too many already

·         ET_ERROR_EXISTS - error status of exists already

·         ET_ERROR_WAKEUP - error status indicating a user call of et_wakeup_attachments or et_wakeup_all was made in order to wake up an attachment trying to get events.

·         ET_ERROR_TIMEOUT - error status of timeout

·         ET_ERROR_EMPTY - error status of no events in station input list

·         ET_ERROR_BUSY - error status of another process currently accessing a station's input or output list.

·         ET_ERROR_DEAD - error status indicating ET system is dead.

·         ET_ERROR_READ - error reading from socket in remote consumer.

·         ET_ERROR_WRITE - error writing to socket in remote consumer.

·         ET_ERROR_REMOTE - error in remote consumer. Used to differentiate between an error generated locally in the remote consumer from an error (ET_ERROR) generated and returned by the ET server or a valid value returned from a routine.

·         ET_ERROR_NOREMOTE - error indicating that the routine is not supported on a remote consumer.

·         ET_ERROR_TOOBIG - client is 32 bits & server is 64 (or vice versa) and event is too big for one.

·         ET_ERROR_NOMEM - cannot allocate memory.

·         ET_ERROR_BADARG - bad argument given to function.

·         ET_ERROR_SOCKET - socket option could not be set.

·         ET_ERROR_NETWORK - host name or address could not be resolved, or cannot connect.

Debug Output Levels

·         ET_DEBUG_NONE - no debug output

·         ET_DEBUG_SEVERE - severe errors only debug output

·         ET_DEBUG_ERROR - all errors debug output

·         ET_DEBUG_WARN - all errors and warnings debug output

·         ET_DEBUG_INFO - all errors, warnings, and informational debug ouput

Event Related

Priority

·         ET_LOW - low event priority

·         ET_HIGH - high event priority

Swapping Necessity

·         ET_SWAP - the data of the event needs swapping

·         ET_NOSWAP - the data of the event does NOT need swapping

Data Status

·         ET_DATA_OK - event data is OK

·         ET_DATA_CORRUPT - event data is corrupt

·         ET_DATA_POSSIBLY_CORRUPT - event data may be corrupt

Waiting Modes for Events

·         ET_ASYNC - event get routines' async wait mode

·         ET_SLEEP - event get routines' sleep wait mode

·         ET_TIMED - event get routines' timed wait mode

·         ET_MODIFY - remote event will be modified and put back. This flag gets ORed with one of ET_SLEEP, ET_TIMED, or ET_ASYNC.

·         ET_MODIFY_HEADER - remote event will have its header information modified and put back. This flag gets ORed with one of ET_SLEEP, ET_TIMED, or ET_ASYNC.

·         ET_DUMP - remote user wants events dumped (not put) when placed back into the ET system

·         ET_NOALLOC - remote user will not allocate memory and read data into it when getting event (new or existing), but will let user specify a local buffer with data

Endian Values

·         ET_ENDIAN_BIG – event’s data is big endian

·         ET_ENDIAN_LITTLE – event’s data is little endian

·         ET_ENDIAN_LOCAL – event’s data is same endian as the local machine

·         ET_ENDIAN_NOTLOCAL – event’s data is opposite endian as the local machine

·         ET_ENDIAN_SWITCH – event’s endian (metadata) should be switched from whatever it currently is set to

Station Related

General

·         ET_GRANDCENTRAL - station id for GRAND_CENTRAL

·         ET_STATION_SELECT_INTS - number of event selection integers associated with each station

·         ET_END when creating a new station, put at the end of the list of stations

·         ET_NEWHEAD – when creating a new parallel station, make it the head of a new group of parallel stations (and therefore in the main list of stations)

Station Status

·         ET_STATION_UNUSED - station status when unused

·         ET_STATION_CREATING - station status when it is being created

·         ET_STATION_IDLE - station status when it has been created but has no processes attached to it

·         ET_STATION_ACTIVE - station status when it is active

Number of Users per Station

·         ET_STATION_USER_MULTI - mode allowing many users to attach to a particular station

·         ET_STATION_USER_SINGLE - mode allowing one user only to attach to a particular station

Station Blocking Modes

·         ET_STATION_NONBLOCKING - mode which does not block the flow of events through the ET system at a particular station

·         ET_STATION_BLOCKING - mode which blocks the flow of events through the ET system so all must pass through a particular station

Event Flow Through Station

·         ET_STATION_SERIAL - normal flow of events through station

·         ET_STATION_PARALLEL - station is part of a group of stations in which events flow in parallel

·         ET_STATION_PARALLEL_HEAD - station is head of a group of stations in which events flow in parallel (not used for configuration)

Event Selection Modes

·         ET_STATION_SELECT_ALL - station mode in which all events selected

·         ET_STATION_SELECT_MATCH - station mode in which events whose control integer array match the station's selection integer array in a predefined manner, are selected (see next chapter for details)

·         ET_STATION_SELECT_USER - station mode in which events that meet user-defined criteria are selected (see next chapter for details)

·         ET_STATION_SELECT_RROBIN - round robin distribution of events to each station in a group of parallel stations

·         ET_STATION_SELECT_EQUALCUE - equal-number-of-events-in-queue distribution to each station in a group of parallel stations

Event Restore Modes

·         ET_STATION_RESTORE_OUT - mode which restores events in a dead user process back to the ET system by placing them in the station's output list

·         ET_STATION_RESTORE_IN - mode which restores events in a dead user process back to the ET system by placing them in the station's input list

·         ET_STATION_RESTORE_GC - mode which restores events in a dead user process back to the ET system by placing them in grandcentral station's input list

·         ET_STATION_RESTORE_REDIST - mode which restores events in a dead user process back to the ET system by redistributing them to the group of parallel stations that they came from. This is done by placing them in the previous station’s output list.

Default Values

·         ET_STATION_CUE - default number of events to cue in a nonblocking station (10)

·         ET_STATION_PRESCALE - default prescale value for blocking stations (1)

Network Related

Data Swapping

·         ET_SWAP - swapping of data is necessary since consumer and server are on different endian machines

·         ET_NOSWAP - no swapping of data is necessary since consumer and server are on the same endian machines

ET System Discovery

·         ET_BROADCAST - discover ET system by broadcasting

·         ET_MULTICAST - discover ET system by multicasting

·         ET_BROADANDMULTICAST - discover ET system by broadcasting and multicasting

·         ET_DIRECT - connect directly (no broad/multicast) to ET system by specifying ET server port number and host

ET System Discovery Multiple Response Policy

·         ET_POLICY_FIRST - the first ET system to respond to a broad/multicast is opened

·         ET_POLICY_LOCAL - the first local ET system to respond to a broad/multicast is opened. If there is none, the first remote response is chosen.

·         ET_POLICY_ERROR - an error is returned if more than one response to a broad/multicast is received

Port Numbers, Addresses, TTL

·         ET_BROADCAST_PORT - port number for broadcasting (default = 11111)

·         ET_MULTICAST_PORT - port number for multicasting (default = 11111)

·         ET_SERVER_PORT - port number of the ET system for communicating with remote users (default = 11111)

·         ET_BROADCAST_ADDR - broadcasting IP address (default = daq group subnet = "129.57.29.255")

·         ET_MULTICAST_ADDR - multicasting IP address (default = "239.200.0.0")

·         ET_MULTICAST_TTL - multicast TTL (time to live) value (default = 32)

ET System Location

·         ET_HOST_LOCAL - ET system's host is local

·         ET_HOST_REMOTE - ET system's host is remote

·         ET_HOST_ANYWHERE - ET system's host may be local or remote

ET System Network Behavior

·         ET_HOST_AS_LOCAL - ET system is treated as local if it is local

·         ET_HOST_AS_REMOTE - ET system is treated as remote even if it is local

Subnets

·         ET_SUBNET_DEFAULT - the subnet broadcast address associated with the host name given by the routine "uname"

·         ET_SUBNET_ALL - all the local subnet broadcast addresses

PreviousNext