TINE server engine plus API routines. More...
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <math.h>#include "prolog.h"#include "srvcore.h"#include "threader.h"#include "globals.h"#include "errors.h"#include "dbtools.h"#include "almlib.h"#include "hstlib.h"#include "srvip.h"#include "srvipx.h"#include "ttycmd.h"Functions | |
| TINE_EXPORT int | GetServerTransportCeiling (void) |
| Gets the server-side transport ceiling (in bytes) which gives the maximum transport size for supported by calls to a multi-threaded server. | |
| TINE_EXPORT void | SetServerTransportCeiling (int value) |
| Sets the server-side transport ceiling (in bytes) which gives the maximum transport size for supported by calls to a multi-threaded server. | |
Variables | |
| TINE_EXPORT UINT32 | MaxSystemTransportSize = MAX_TRANSPORTSIZE |
| Determines the maximum size in bytes of any call supported by the server. | |
| int | RequireAcknowledgments = 1 |
| Determines whether acknowledgements are expected following data changes where contracts use CM_DATACHANGE mode. | |
| TINE_EXPORT int | SystemPresetMemory = TRUE |
| Determines whether data requests preset the calling buffer to zero before issuing the call. | |
| int | SystemRunning = FALSE |
| Determines whether a server has been successfully initialized or not. | |
TINE server engine plus API routines.
| TINE_EXPORT int GetServerTransportCeiling | ( | void | ) |
Gets the server-side transport ceiling (in bytes) which gives the maximum transport size for supported by calls to a multi-threaded server.
Server-side equipment function calls are double buffered, one buffer being a dynamic allocation of the caller's requested data size to be used in data comparisons, the other buffer being in the case of multi-threaded servers, another dynamic allocation of the data size to be used in dispatch calls. In order to allow transfer of 'large' data sets, this size size needs to be adjusted accordingly. If not set, the setting given by the server work area size will be used. This call returns the current setting of this value. If the call returns '-1' this indicates that there is no setting and in such cases the server work area size is used as the allowed output data size in bytes.
| TINE_EXPORT void SetServerTransportCeiling | ( | int | value | ) |
Sets the server-side transport ceiling (in bytes) which gives the maximum transport size for supported by calls to a multi-threaded server.
Server-side equipment function calls are double buffered, one buffer being a dynamic allocation of the caller's requested data size to be used in data comparisons, the other buffer being in the case of multi-threaded servers, another dynamic allocation of the data size to be used in dispatch calls. In order to allow transfer of 'large' data sets, this size size needs to be adjusted accordingly. If not set, the setting given by the server work area size will be used.
| value | is the size in bytes to be used as the transport ceiling for any property supported by the server. (default: the same value as the server work area size, i.e. 64 KBytes on most operating systems). |
References feclog(), and MaxSystemTransportSize.
| TINE_EXPORT UINT32 MaxSystemTransportSize = MAX_TRANSPORTSIZE |
Determines the maximum size in bytes of any call supported by the server.
Any call which attempts to access more than the MaxSystemTransportSize will fail with 'invalid transport size'. If it is known before hand that the server should support calls for very large amounts of data, and there is available main memory on the server, this value should be set accordingly prior to the call to SystemInit().
Default: 64 Kb for most operating systems. Exceptions: DOS (16 Kbyte), Win16 (32 Kbyte).
Referenced by GetWorkAreaSize(), RegisterPropertyInformation(), and SetServerTransportCeiling().
| int RequireAcknowledgments = 1 |
Determines whether acknowledgements are expected following data changes where contracts use CM_DATACHANGE mode.
Under CM_TIMER link conditions the server is not directly interested as to whether the client received its data packet or not, since the client is expecting data to arrive at the polling interval and will complain if it is missing. However,when a client establishes a data link and requests CM_DATACHANGE mode, data are are only returned to the client when they have changed, or when the link heartbeat (1 minute) has expired. A server will under these conditions require an acknowledgement from the client if data do in fact change. A missing acknowledgement will cause the server to re-issue the data transfer. This default behavior will of course increase the network traffic when data are frequently changing. Under some circumstance it is undesireable to require acknowledgments and this feature can be turned off by setting this value to FALSE.
Default: TRUE
Referenced by GetSystemRequireAcknowledgments(), and SetSystemRequireAcknowledgments().
| TINE_EXPORT int SystemPresetMemory = TRUE |
Determines whether data requests preset the calling buffer to zero before issuing the call.
If a server always returns the amount of data requested, then presetting the calling buffer contents can be entirely superfluous, and in the case of large data call, can result in a non-negligible increase in the server CPU load. On the other hand, if a server returns less than the amount of data asked for, or the caller asks for an array of fixed string length data, there could be unforseen side-effects if the calling buffer has not been zeroed out.
Default: TRUE
| int SystemRunning = FALSE |
Determines whether a server has been successfully initialized or not.
A server can query this flag at any stage to determine if all initialization step have been successfully completed or not. You should never set this flag yourself.
Default: FALSE
Referenced by IsServerRunning().
1.5.8