Here
is a list of documented API Categories with brief descriptions:
TINE Local Alarm Server plus API routines |
|
TINE Client-side API Routines |
|
TINE Local History Server module plus API routines |
|
TINE Server engine and registration API routines |
|
TINE Socket control (for experts) |
|
TINE System API routines |
|
TINE Cycler API routines for shared libraries |
|
TINE API tools |
|
TINE console command line API |
|
TINE Error code information |
When using the TINE API in projects in C or C++ you will
generally only need to include "tine.h".
As of Release 5.0, the optional compile switches tine_decorated_constants
and TINE_DECORATED_CONSTANTS have no effect. Collisions with standard
template class names, etc. are now avoided via the use of enumerating relevant
constants rather than macro #defining them.
When using C++, you have the choice of either wrapping tine.h with a separate namespace or not. In neither case
will naming collisions occur!
Note that the standard download package ‘setup’ will make both single-threaded
and multi-threaded builds of the tine libraries (as well as ‘static’ or
‘shared’ libraries). So you have some
lee-way in deciding how to construct your client or server application. Under most circumstances it is advised to use
the multi-threaded builds, and if many clients and servers are to run on the
same host, then to make use of the shared libraries as well (.DLLs on windows
systems or .so libraries on Unix systems).
In any event, the application should start and
keep a ‘cycler’ going throughout the application’s lifetime. In multi-threaded builds a call to SystemSetCycleTimer() will suffice, as this will launch an independent thread
with a tight loop around SystemCycle(). This is, of course, not necessary. But if omitted it is the application’s
responsibility to call SystemCycle() regularly. Note
that a ‘tight loop’ here does not impose a high CPU load, as SystemCycle()
will typically be in a ‘wait state’ while ‘select()ing’
over socket descriptor sets (with a timeout on the order of a clock tick).