Open config

These routines configure the options necessary to open an ET system. More...

Functions

int et_open_config_init (et_openconfig *sconfig)
 This routine initializes a configuration used to open an ET system.
int et_open_config_destroy (et_openconfig sconfig)
 This routine frees the memory allocated when an open configuration is initialized by et_open_config_init.
int et_open_config_setwait (et_openconfig sconfig, int val)
 This routine sets the means to wait for a valid ET system to be detected.
int et_open_config_getwait (et_openconfig sconfig, int *val)
 This routine gets the means being used to wait for a valid ET system to be detected.
int et_open_config_setcast (et_openconfig sconfig, int val)
 This routine sets the method for a remote user to discover the ET system.
int et_open_config_getcast (et_openconfig sconfig, int *val)
 This routine gets the method for a remote user to discover the ET system.
int et_open_config_setTTL (et_openconfig sconfig, int val)
 This routine sets the "ttl" value for multicasting.
int et_open_config_getTTL (et_openconfig sconfig, int *val)
 This routine gets the "ttl" value for multicasting.
int et_open_config_setmode (et_openconfig sconfig, int val)
 This routine sets whether the ET system treats the user running this routine as local (if it is local) or remote even if it is local.
int et_open_config_getmode (et_openconfig sconfig, int *val)
 This routine gets whether the ET system treats the user running this routine as local (if it is local) or remote even if it is local.
int et_open_config_setdebugdefault (et_openconfig sconfig, int val)
 This routine sets the default level of debug output.
int et_open_config_getdebugdefault (et_openconfig sconfig, int *val)
 This routine gets the default level of debug output.
int et_open_config_setport (et_openconfig sconfig, int val)
 This routine sets the port number for the UDP broadcasting used to discover the ET system.
int et_open_config_getport (et_openconfig sconfig, int *val)
 This routine gets the port number for the UDP broadcasting used to discover the ET system.
int et_open_config_setmultiport (et_openconfig sconfig, int val)
 This routine sets the port number for the UDP multicasting used to discover the ET system.
int et_open_config_getmultiport (et_openconfig sconfig, int *val)
 This routine gets the port number for the UDP multicasting used to discover the ET system.
int et_open_config_setserverport (et_openconfig sconfig, int val)
 This routine sets the TCP port number for opening an ET system directly without broadcasting or multicasting.
int et_open_config_getserverport (et_openconfig sconfig, int *val)
 This routine gets the TCP port number for opening an ET system directly without broadcasting or multicasting.
int et_open_config_settimeout (et_openconfig sconfig, struct timespec val)
 This routine sets the maximum time to wait for a valid ET system to be detected.
int et_open_config_gettimeout (et_openconfig sconfig, struct timespec *val)
 This routine gets the maximum time to wait for a valid ET system to be detected.
int et_open_config_addbroadcast (et_openconfig sconfig, const char *val)
 This routine adds an IP subnet broadcast address to a list of destinations used in broadcast discovery of the ET system.
int et_open_config_removebroadcast (et_openconfig sconfig, const char *val)
 This routine removes an IP subnet broadcast address from a list of destinations used in broadcast discovery of the ET system.
int et_open_config_addmulticast (et_openconfig sconfig, const char *val)
 This routine adds an IP multicast address to a list of destinations used in multicast discovery of the ET system.
int et_open_config_removemulticast (et_openconfig sconfig, const char *val)
 This routine removes a multicast address from a list of destinations used in multicast discovery of the ET system.
int et_open_config_setpolicy (et_openconfig sconfig, int val)
 This routine sets the return policy from calls to et_open.
int et_open_config_getpolicy (et_openconfig sconfig, int *val)
 This routine gets the return policy from calls to et_open.
int et_open_config_sethost (et_openconfig sconfig, const char *val)
 This routine sets host or computer on which the ET system is running.
int et_open_config_gethost (et_openconfig sconfig, char *val)
 This routine gets the host or computer on which the ET system is running.
int et_open_config_setinterface (et_openconfig sconfig, const char *val)
 This routine sets the network interface to use when communicating over the network with the ET system.
int et_open_config_getinterface (et_openconfig sconfig, char *val)
 This routine gets the network interface being used to communicate over the network with the ET system.
int et_open_config_settcp (et_openconfig sconfig, int rBufSize, int sBufSize, int noDelay)
 This routine sets the parameters of any TCP connection to the ET system.
int et_open_config_gettcp (et_openconfig sconfig, int *rBufSize, int *sBufSize, int *noDelay)
 This routine gets the parameters of any TCP connection to the ET system.

Detailed Description

These routines configure the options necessary to open an ET system.


Function Documentation

int et_open_config_addbroadcast ( et_openconfig  sconfig,
const char *  val 
)

This routine adds an IP subnet broadcast address to a list of destinations used in broadcast discovery of the ET system.

Broadcasting is only used if et_open_config_setcast is set to ET_BROADCAST or ET_BROADANDMULTICAST.

The broadcast address must be in dot-decimal form. If this routine is never called, the list of addresses is automatically set to all the local subnet broadcast addresses. However, if finding these addresses fails, then the list is set to a single entry of ET_BROADCAST_ADDR. This argument may also be set to ET_SUBNET_ALL which specifies all the local subnet broadcast addresses.

Parameters:
sconfig open configuration.
val broadcast address in dot-decimal form.
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL, sconfig not initialized, val is not dot-decimal format, or cannot allocate memory.

References et_open_config_t::bcastaddrs, ET_ERROR, ET_OK, ET_STRUCT_OK, ET_SUBNET_ALL, and et_open_config_t::init.

int et_open_config_addmulticast ( et_openconfig  sconfig,
const char *  val 
)

This routine adds an IP multicast address to a list of destinations used in multicast discovery of the ET system.

Multicasting is only used if et_open_config_setcast is set to ET_MULTICAST or ET_BROADANDMULTICAST.

The multicast address must be in dot-decimal form. There can be at most ET_MAXADDRESSES addresses in the list. Duplicate entries are not added to the list.

Parameters:
sconfig open configuration.
val multicast address in dot-decimal form.
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL, sconfig not initialized, val is not in valid multicast format, or list is full.

References ET_ERROR, ET_IPADDRSTRLEN, ET_MAXADDRESSES, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::mcastaddrs.

int et_open_config_destroy ( et_openconfig  sconfig  ) 

This routine frees the memory allocated when an open configuration is initialized by et_open_config_init.

Parameters:
sconfig open configuration
Returns:
ET_OK

References et_open_config_t::bcastaddrs, ET_OK, and et_open_config_t::netinfo.

Referenced by et_open().

int et_open_config_getcast ( et_openconfig  sconfig,
int *  val 
)

This routine gets the method for a remote user to discover the ET system.

Parameters:
sconfig open configuration.
val int pointer which is filled with ET_BROADCAST, ET_MULTICAST, ET_BROADANDMULTICAST, or ET_DIRECT.
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized.

References et_open_config_t::cast, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_open_config_t::init.

int et_open_config_getdebugdefault ( et_openconfig  sconfig,
int *  val 
)

This routine gets the default level of debug output.

Parameters:
sconfig open configuration.
val int pointer which is filled with 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 sconfig not initialized.

References et_open_config_t::debug_default, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_open_config_t::init.

Referenced by et_open().

int et_open_config_gethost ( et_openconfig  sconfig,
char *  val 
)

This routine gets the host or computer on which the ET system is running.

See also:
et_open_config_sethost
Parameters:
sconfig open configuration.
val char pointer which is filled with host name.
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_open_config_t::host, and et_open_config_t::init.

int et_open_config_getinterface ( et_openconfig  sconfig,
char *  val 
)

This routine gets the network interface being used to communicate over the network with the ET system.

See also:
et_open_config_setinterface
Parameters:
sconfig open configuration.
val char pointer which is filled with network IP address (NULL if none).
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized.

References ET_ERROR, ET_IPADDRSTRLEN, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::interface.

int et_open_config_getmode ( et_openconfig  sconfig,
int *  val 
)

This routine gets whether the ET system treats the user running this routine as local (if it is local) or remote even if it is local.

Parameters:
sconfig open configuration.
val int pointer to be filled with ET_HOST_AS_REMOTE or ET_HOST_AS_LOCAL.
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_open_config_t::init, and et_open_config_t::mode.

int et_open_config_getmultiport ( et_openconfig  sconfig,
int *  val 
)

This routine gets the port number for the UDP multicasting used to discover the ET system.

Parameters:
sconfig open configuration.
val int pointer which gets filled with the UDP port number.
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_open_config_t::init, and et_open_config_t::multiport.

int et_open_config_getpolicy ( et_openconfig  sconfig,
int *  val 
)

This routine gets the return policy from calls to et_open.

See also:
et_open_config_setpolicy.
Parameters:
sconfig open configuration.
val int pointer which is filled with ET_POLICY_ERROR, ET_POLICY_FIRST, or ET_POLICY_LOCAL.
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_open_config_t::init, and et_open_config_t::policy.

int et_open_config_getport ( et_openconfig  sconfig,
int *  val 
)

This routine gets the port number for the UDP broadcasting used to discover the ET system.

Parameters:
sconfig open configuration.
val int pointer which gets filled with the UDP port number.
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_open_config_t::init, and et_open_config_t::udpport.

int et_open_config_getserverport ( et_openconfig  sconfig,
int *  val 
)

This routine gets the TCP port number for opening an ET system directly without broadcasting or multicasting.

Parameters:
sconfig open configuration.
val int pointer which gets filled with the TCP port number.
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_open_config_t::init, and et_open_config_t::serverport.

int et_open_config_gettcp ( et_openconfig  sconfig,
int *  rBufSize,
int *  sBufSize,
int *  noDelay 
)

This routine gets the parameters of any TCP connection to the ET system.

These include the TCP receiving buffer size in bytes, the TCP sending buffer size in bytes, and the TCP NODELAY value.

See also:
et_open_config_settcp
Parameters:
sconfig open configuration.
rBufSize int pointer that gets filled with the TCP receiving buffer size in bytes.
sBufSize int pointer that gets filled with the TCP sending buffer size in bytes.
noDelay int pointer that gets filled with a boolean value, which is true (1) for no delay of TCP writes, else false (0).
Returns:
ET_OK if successful.
ET_ERROR if sconfig arg is NULL or not initialized.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, et_open_config_t::tcpNoDelay, et_open_config_t::tcpRecvBufSize, and et_open_config_t::tcpSendBufSize.

int et_open_config_gettimeout ( et_openconfig  sconfig,
struct timespec *  val 
)

This routine gets the maximum time to wait for a valid ET system to be detected.

Parameters:
sconfig open configuration.
val int pointer which gets filled max wait time.
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_open_config_t::init, and et_open_config_t::timeout.

int et_open_config_getTTL ( et_openconfig  sconfig,
int *  val 
)

This routine gets the "ttl" value for multicasting.

Parameters:
sconfig open configuration.
val int pointer which is filled with ttl value.
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_open_config_t::init, and et_open_config_t::ttl.

int et_open_config_getwait ( et_openconfig  sconfig,
int *  val 
)

This routine gets the means being used to wait for a valid ET system to be detected.

Parameters:
sconfig open configuration.
val int pointer which get filled with either ET_OPEN_WAIT or ET_OPEN_NOWAIT.
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_open_config_t::init, and et_open_config_t::wait.

int et_open_config_init ( et_openconfig sconfig  ) 
int et_open_config_removebroadcast ( et_openconfig  sconfig,
const char *  val 
)

This routine removes an IP subnet broadcast address from a list of destinations used in broadcast discovery of the ET system.

Broadcasting is only used if et_open_config_setcast is set to ET_BROADCAST or ET_BROADANDMULTICAST.

The subnet broadcast IP address must be in dotted-decimal form. If there is no such address on the list, it is ignored. This argument may also be set to ET_SUBNET_ALL which specifies all the local subnet broadcast addresses.

Parameters:
sconfig open configuration.
val broadcast address in dot-decimal form.
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL, sconfig not initialized, val is not dot-decimal format.

References et_open_config_t::bcastaddrs, ET_ERROR, ET_OK, ET_STRUCT_OK, ET_SUBNET_ALL, and et_open_config_t::init.

int et_open_config_removemulticast ( et_openconfig  sconfig,
const char *  val 
)

This routine removes a multicast address from a list of destinations used in multicast discovery of the ET system.

Multicasting is only used if et_open_config_setcast is set to ET_MULTICAST or ET_BROADANDMULTICAST.

The multicast address must be in dot-decimal form. If there is no such address on the list, it is ignored.

Parameters:
sconfig open configuration.
val multicast address in dot-decimal form.
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL, sconfig not initialized, val is not in valid multicast format.

References ET_ERROR, ET_IPADDRSTRLEN, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::mcastaddrs.

int et_open_config_setcast ( et_openconfig  sconfig,
int  val 
)

This routine sets the method for a remote user to discover the ET system.

Setting the method to ET_BROADCAST uses UDP broadcasting (the default), ET_MULTICAST uses UDP multicasting, ET_BROADANDMULTICAST uses both, and ET_DIRECT uses a direct connection to the ET system by specifying the host and server TCP port.

To avoid broad/multicasting to find the ET system (actually to find the TCP port number of ET's server), use the ET_DIRECT option which connects to ET directly. A possible reason for wanting to avoid broad/multicasting is if the ET system and user are on different subnets and routers will not pass the UDP packets between them. If the ET_DIRECT option is taken, be aware that et_open_config_sethost must use the ET system's actual host name or "localhost" but must NOT be ET_HOST_LOCAL, ET_HOST_REMOTE, or ET_HOST_ANYWHERE. Use et_open_config_setserverport to specify the TCP port number of the ET server.

Parameters:
sconfig open configuration.
val ET_MULTICAST, ET_BROADCAST, ET_BROADANDMULTICAST, or ET_DIRECT.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is not ET_MULTICAST, ET_BROADCAST, ET_BROADANDMULTICAST, or ET_DIRECT.

References et_open_config_t::cast, ET_BROADANDMULTICAST, ET_BROADCAST, ET_DIRECT, ET_ERROR, ET_MULTICAST, ET_OK, ET_STRUCT_OK, and et_open_config_t::init.

int et_open_config_setdebugdefault ( et_openconfig  sconfig,
int  val 
)

This routine sets the default level of debug output.

Set val to ET_DEBUG_NONE for no output, ET_DEBUG_SEVERE for output describing severe errors, ET_DEBUG_ERROR for output describing all errors, ET_DEBUG_WARN for output describing warnings and errors, and ET_DEBUG_INFO for output describing all information, warnings, and errors.

Parameters:
sconfig open configuration.
val ET_DEBUG_NONE, ET_DEBUG_SEVERE, ET_DEBUG_ERROR, ET_DEBUG_WARN, or ET_DEBUG_INFO.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is not ET_DEBUG_NONE, ET_DEBUG_SEVERE, ET_DEBUG_ERROR, ET_DEBUG_WARN, or ET_DEBUG_INFO.

References et_open_config_t::debug_default, ET_DEBUG_ERROR, ET_DEBUG_INFO, ET_DEBUG_NONE, ET_DEBUG_SEVERE, ET_DEBUG_WARN, ET_ERROR, ET_OK, ET_STRUCT_OK, and et_open_config_t::init.

int et_open_config_sethost ( et_openconfig  sconfig,
const char *  val 
)

This routine sets host or computer on which the ET system is running.

The host is the name of the computer on which the ET system resides. For opening a local system only, set val to ET_HOST_LOCAL (the default) or "localhost" (including quotes). For opening a system on an unknown remote computer only, set it to ET_HOST_REMOTE. For an unknown host which may be local or remote, set it to ET_HOST_ANYWHERE. Otherwise set val to the name or dotted-decimal IP address of the desired host. If the ET_DIRECT option is taken in et_open_config_setcast, be aware that this routine must use the ET system's actual host name or "localhost" but must NOT be ET_HOST_LOCAL, ET_HOST_REMOTE, or ET_HOST_ANYWHERE.

Parameters:
sconfig open configuration.
val host name, "localhost", ET_HOST_LOCAL, ET_HOST_REMOTE, or ET_HOST_ANYWHERE.
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized; if val is longer than ET_FUNCNAME_LENGTH - 1.

References ET_ERROR, ET_FUNCNAME_LENGTH, ET_OK, ET_STRUCT_OK, et_open_config_t::host, and et_open_config_t::init.

int et_open_config_setinterface ( et_openconfig  sconfig,
const char *  val 
)

This routine sets the network interface to use when communicating over the network with the ET system.

Network communications with the ET system is only used when the ET system host is not local, the mode is ET_HOST_AS_REMOTE, or a Java ET system has been opened. The interface must be specified in dot-decimal form. In addition to being a valid, local IP address, the given address may be a network (subnet) address. If it is such, it will convert that to the specific IP associated with it.

Parameters:
sconfig open configuration.
val valid local or network dot-decimal IP address
Returns:
ET_OK if successful.
ET_ERROR if either arg is NULL or sconfig not initialized; if val is not in dot-decimal form.

References ET_ERROR, ET_IPADDRSTRLEN, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::interface.

int et_open_config_setmode ( et_openconfig  sconfig,
int  val 
)

This routine sets whether the ET system treats the user running this routine as local (if it is local) or remote even if it is local.

Set val to ET_HOST_AS_REMOTE if the local user is to be treated as remote. This means all communication is done through the ET server using sockets. The alternative is to set val to ET_HOST_AS_LOCAL (default) which means local users are treated as local with the ET system memory being mapped into the user's space.

Parameters:
sconfig open configuration.
val ET_HOST_AS_REMOTE or ET_HOST_AS_LOCAL.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is not ET_HOST_AS_REMOTE or ET_HOST_AS_LOCAL.

References ET_ERROR, ET_HOST_AS_LOCAL, ET_HOST_AS_REMOTE, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::mode.

int et_open_config_setmultiport ( et_openconfig  sconfig,
int  val 
)

This routine sets the port number for the UDP multicasting used to discover the ET system.

The multicasting port only needs to be different from the broadcast port on Java-based ET systems. The default is ET_MULTICAST_PORT, but may be set to any number > 1023 and < 65536.

Parameters:
sconfig open configuration.
val UDP port number.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is < 1024 and > 65535.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::multiport.

int et_open_config_setpolicy ( et_openconfig  sconfig,
int  val 
)

This routine sets the return policy from calls to et_open.

If an et_open generates more than one response from one or more ET systems, this policy can be set to return an error, open the first system to respond, or open the first local system to respond.

One ET system may respond multiple times to a single et_open by a user if it is connected to more than one subnet or is listening to multiple multicast addresses. It is also possible that if a user is configured for ET_HOST_REMOTE or ET_HOST_ANYWHERE, several ET systems may have the same name and respond with their port numbers and host names. Thus, the user needs to determine the best way to respond to such situations.

The policy can be set to ET_POLICY_ERROR if the user wants et_open to return an error if more than one response is received from its broad or multicast attempt to find an ET system. Set it to ET_POLICY_FIRST if the first responding system is the one to be opened. Else, set it to ET_POLICY_LOCAL if the first responding local system is opened if there is one, and if not, the first responding system.

Parameters:
sconfig open configuration.
val return policy: ET_POLICY_ERROR, ET_POLICY_FIRST, or ET_POLICY_LOCAL.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is not ET_POLICY_ERROR, ET_POLICY_FIRST, or ET_POLICY_LOCAL.

References ET_ERROR, ET_OK, ET_POLICY_ERROR, ET_POLICY_FIRST, ET_POLICY_LOCAL, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::policy.

int et_open_config_setport ( et_openconfig  sconfig,
int  val 
)

This routine sets the port number for the UDP broadcasting used to discover the ET system.

The default is ET_BROADCAST_PORT, but may be set to any number > 1023 and < 65536.

Parameters:
sconfig open configuration.
val UDP port number.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is < 1024 and > 65535.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::udpport.

int et_open_config_setserverport ( et_openconfig  sconfig,
int  val 
)

This routine sets the TCP port number for opening an ET system directly without broadcasting or multicasting.

The default is ET_SERVER_PORT, but may be set to any number > 1023 and < 65536. To avoid broadcasting or multicasting to find the ET system, use et_open_config_setcast set to the ET_DIRECT option. This does no broad/multicast and connects directly to the ET system. A possible reason for wanting to avoid broad/multicasting is if the ET system and user are on different subnets and routers will not pass the UDP packets between them.

Parameters:
sconfig open configuration.
val TCP port number.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is < 1024 and > 65535.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::serverport.

int et_open_config_settcp ( et_openconfig  sconfig,
int  rBufSize,
int  sBufSize,
int  noDelay 
)

This routine sets the parameters of any TCP connection to the ET system.

These include the TCP receiving buffer size in bytes, the TCP sending buffer size in bytes, and the TCP NODELAY value. If either of the buffer sizes are 0, then the operating system default values are used. Setting NODELAY to 0, turns it off, anything else turns it on (which sends a write immediately over the network without waiting for further writes).

Parameters:
sconfig open configuration.
rBufSize TCP receiving buffer size in bytes.
sBufSize TCP sending buffer size in bytes.
noDelay boolean value which is true (non-zero) for no delay of TCP writes, else false (zero).
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if sizes are negative numbers.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, et_open_config_t::tcpNoDelay, et_open_config_t::tcpRecvBufSize, and et_open_config_t::tcpSendBufSize.

int et_open_config_settimeout ( et_openconfig  sconfig,
struct timespec  val 
)

This routine sets the maximum time to wait for a valid ET system to be detected.

If et_open_config_setmode was set to ET_OPEN_WAIT, then this routine sets the maximum amount of time to wait for an alive ET system to be detected. If the time is set to zero (the default), an infinite time is indicated.

Note that in local systems, et_open waits in integral units of the system's heartbeat time (default of 1/2 second). If broad/multicasting to find a remote ET system, it is possible to take up to several seconds to determine whether the system is alive or not. In this case, the time limit may be exceeded.

Parameters:
sconfig open configuration.
val time to wait (0 = infinite).
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized;

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::timeout.

int et_open_config_setTTL ( et_openconfig  sconfig,
int  val 
)

This routine sets the "ttl" value for multicasting.

This value determines how many "hops" through routers the packet makes.

It defaults to a value of 32 which should allow multicast packets to pass through local routers.

Parameters:
sconfig open configuration.
val 0 <= ttl value <= 254.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is < 0 or > 254.

References ET_ERROR, ET_OK, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::ttl.

int et_open_config_setwait ( et_openconfig  sconfig,
int  val 
)

This routine sets the means to wait for a valid ET system to be detected.

Setting val to ET_OPEN_WAIT makes et_open block by waiting until the given ET system is fully functioning or a set time period has passed before returning. Setting val to ET_OPEN_NOWAIT makes et_open return immediately after determining whether the ET system is alive or not. The default is ET_OPEN_NOWAIT.

If the ET system is local, both ET_OPEN_WAIT and ET_OPEN_NOWAIT mean et_open will quickly send a UDP broad/multicast packet to see if the system responds. If it does not, it tries to detect a heartbeat which necessitates waiting at least one heartbeat. However, if the system is remote, broad/multicasting to find its location may take up to several seconds. Usually, if the ET system is up and running, this will only take a fraction of a second. If a direct remote connection is being made, it is only tried once in the ET_OPEN_NOWAIT mode, but it tries repeatedly at 10Hz until the set timeout in the ET_OPEN_WAIT mode.

Parameters:
sconfig open configuration.
val ET_OPEN_WAIT or ET_OPEN_NOWAIT.
Returns:
ET_OK if successful.
ET_ERROR if sconfig is NULL or not initialized; if val is not ET_OPEN_WAIT or ET_OPEN_NOWAIT.

References ET_ERROR, ET_OK, ET_OPEN_NOWAIT, ET_OPEN_WAIT, ET_STRUCT_OK, et_open_config_t::init, and et_open_config_t::wait.


Generated on 30 Jul 2015 for ET System by  doxygen 1.6.1