Transformation Engine API (south side)
south_api.h File Reference

Definition of the interface between Data Clients (DC) and the Transformation Engine (TEK) More...

#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  tek_sa_additional_file
 Configuration class which describes an additional file which is passed to the data client. More...
 
struct  tek_sa_data_client_configuration
 Configuration object containing the contents of the configuration files for the tek_sa_data_client_plugin or tek_sa_data_client instances. More...
 
struct  tek_sa_configuration
 Configuration struct that contains generic properties and settings for TEK instance. More...
 
struct  tek_sa_guid
 The representation of a GUID when used as a field type. More...
 
struct  tek_sa_byte_string
 The representation of a byte array with variable length when used as a field type. More...
 
struct  tek_sa_string
 The representation of a string with variable length when used as a field type. More...
 
struct  tek_sa_complex_data
 The representation of a field value which has a type which is not a predefined type. More...
 
struct  tek_sa_complex_data_array_item
 The representation of the items of an array of complex data values with exactly one dimension. More...
 
struct  tek_sa_complex_data_array
 The representation of an array of complex data with exactly one dimension. More...
 
struct  tek_sa_complex_data_matrix
 The representation of array of complex data with more than one dimension. More...
 
struct  tek_sa_variant_array
 The representation of a one dimensional array of the supported base types. More...
 
struct  tek_sa_variant_matrix
 The representation of an array with more than one dimension of the supported base types. More...
 
struct  tek_sa_variant
 The representation of a single value (which may be of array type too). More...
 
struct  tek_sa_struct_field_type_definition
 The type definition of a record field in a user defined struct type. More...
 
struct  tek_sa_struct_definition
 The type definition of a user defined record type. More...
 
struct  tek_sa_enum_item_definition
 The definition of an enum item which is defined in a user defined enum type. More...
 
struct  tek_sa_enum_definition
 The type definition of a user defined enum type. More...
 
struct  tek_sa_method_argument_description
 The description of a method parameter. More...
 
struct  tek_sa_field_write_request
 Structure to encapsulate the parameters of a write field request. More...
 
struct  tek_sa_write_result
 Structure to encapsulate the result of a write field request. More...
 
struct  tek_sa_read_result
 Structure to encapsulate the result of a read operation of a single field. More...
 
struct  tek_sa_event_parameter
 Structure to encapsulate an event parameter. More...
 
struct  tek_sa_dc_event
 An event which may be sent from the data client to tek_sa_transformation_engine::post_event. More...
 
struct  tek_sa_data_client_capabilities
 capabilities of the data client. These capabilities are applied to the complete data client as well as to each instance (device connection). More...
 
struct  tek_sa_data_client
 The interface of one instance of a data client. More...
 
struct  tek_sa_data_client_plugin
 Interface of the data client plugin. More...
 
struct  tek_sa_transformation_engine
 Interface ot the Transformation Engine. More...
 
union  tek_sa_variant_array.data
 The array values. More...
 
union  tek_sa_variant.data
 The value. More...
 

Macros

#define TEK_SA_API_VERSION_MAJOR   0
 
#define TEK_SA_API_VERSION_MINOR   1
 
#define TEK_SA_API_VERSION_PATCH   0
 
#define TEK_SA_API_VERSION   "0.1.0"
 
#define TEK_SA_ERR_UNSPECIFIED   1000
 unspecified error to be used when no more specific error is available. More...
 

Typedefs

typedef void * tek_sa_data_client_handle
 The type of the data client handle. More...
 
typedef int64_t tek_sa_type_handle
 The type of a handle which is returned for user defined types. More...
 
typedef int64_t tek_sa_type_handle_or_type_enum
 The type for a reference handle which references either a user defined type (see tek_sa_type_handle) or a predefined type (See tek_sa_variant_type.) More...
 
typedef int64_t tek_sa_datetime
 The type of date and time values wen used as a field type. More...
 
typedef struct tek_sa_variant tek_sa_field_value
 Type of data client field values. More...
 
typedef uint32_t tek_sa_field_handle
 Handle type for a field definition. More...
 
typedef uint32_t tek_sa_event_handle
 Handle type for an event definition. More...
 
typedef uint32_t tek_sa_alarm_handle
 Handle type for an alarm definition. More...
 
typedef uint32_t tek_sa_method_handle
 Handle type for a method definition. More...
 
typedef TEK_SA_RESULT(* tek_sa_load_plugin_fn) (struct tek_sa_transformation_engine *api, const struct tek_sa_data_client_configuration *plugin_configuration, struct tek_sa_data_client_plugin *plugin, struct tek_sa_configuration *tek_configuration)
 Signature for the load plugin function. More...
 

Enumerations

enum  tek_sa_variant_type {
  TEK_SA_VARIANT_TYPE_NULL = 0x0 , TEK_SA_VARIANT_TYPE_BOOL = 0x1 , TEK_SA_VARIANT_TYPE_UINT8_T = 0x2 , TEK_SA_VARIANT_TYPE_INT8_T = 0x3 ,
  TEK_SA_VARIANT_TYPE_UINT16_T = 0x4 , TEK_SA_VARIANT_TYPE_INT16_T = 0x5 , TEK_SA_VARIANT_TYPE_UINT32_T = 0x6 , TEK_SA_VARIANT_TYPE_INT32_T = 0x7 ,
  TEK_SA_VARIANT_TYPE_UINT64_T = 0x8 , TEK_SA_VARIANT_TYPE_INT64_T = 0x9 , TEK_SA_VARIANT_TYPE_FLOAT = 0xa , TEK_SA_VARIANT_TYPE_DOUBLE = 0xb ,
  TEK_SA_VARIANT_TYPE_DATETIME = 0xc , TEK_SA_VARIANT_TYPE_STRING = 0xd , TEK_SA_VARIANT_TYPE_GUID = 0xe , TEK_SA_VARIANT_TYPE_BYTE_STRING = 0xf ,
  TEK_SA_VARIANT_TYPE_COMPLEX = 0x20 , TEK_SA_VARIANT_TYPE_FLAG_ARRAY = 0x40 , TEK_SA_VARIANT_TYPE_FLAG_MATRIX = 0x80
}
 The predefined types which can be processed in the TE. More...
 
enum  tek_sa_field_attributes { TEK_SA_FIELD_ATTRIBUTES_WRITABLE = 0x1 , TEK_SA_FIELD_ATTRIBUTES_READABLE = 0x2 , TEK_SA_FIELD_ATTRIBUTES_SUBSCRIBABLE = 0x4 }
 Flags type which contains the attributes of a data client field. More...
 
enum  tek_sa_log_level_t {
  TEK_SA_LOG_LEVEL_TRACE = 0x0 , TEK_SA_LOG_LEVEL_DEBUG = 0x1 , TEK_SA_LOG_LEVEL_INFO = 0x2 , TEK_SA_LOG_LEVEL_WARNING = 0x3 ,
  TEK_SA_LOG_LEVEL_ERROR = 0x4 , TEK_SA_LOG_LEVEL_CRITICAL = 0x5
}
 Definition of the possible logging levels which can be used in tek_sa_transformation_engine::log. More...
 
enum  tek_sa_threading_model { TEK_SA_THREADING_MODEL_SAME_THREAD = 0x0 , TEK_SA_THREADING_MODEL_SEQUENTIAL = 0x1 , TEK_SA_THREADING_MODEL_PARALLEL = 0x2 }
 Describes the threading model of a data client instance of a data client plugin. More...
 

StatusCodes

#define TEK_SA_ERR_SUCCESS   0
 An operation was completed successfully. More...
 
#define TEK_SA_ERR_NON_BLOCKING_IMPOSSIBLE   10
 A data client function was called in an asynchronous manner while the implementation can not use multiple threads. More...
 
#define TEK_SA_ERR_OUT_OF_MEMORY   11
 The data client or the Transformation Engine can not process a request because it has no more system resources. More...
 
#define TEK_SA_ERR_INVALID_PARAMETER   12
 The parameters passed to the function are invalid. More...
 
#define TEK_SA_ERR_RETRY_LATER   0xffffffff
 A data client function was called in an asynchronous manner while the number of inflight calls is already active. More...
 
#define TEK_SA_READ_RESULT_STATUS_OK   0
 A read operation completed successfully. More...
 
#define TEK_SA_READ_RESULT_STATUS_NOK   1
 A read operation failed. More...
 
#define TEK_SA_READ_RESULT_STATUS_TIMEOUT   2
 A read operation did not complete within the specified time limit. More...
 
#define TEK_SA_READ_RESULT_STATUS_INVALID_HANDLE   3
 The read operation failed because the passed field handle was invalid. More...
 
#define TEK_SA_BLOCK_TRANSFER_END_OF_FILE   26
 The read operation read until the end of file. More...
 
#define TEK_SA_BLOCK_TRANSFER_ABORT   24
 The block read or write operation should be stopped. More...
 
typedef int TEK_SA_RESULT
 The return value type of all interface functions (which need to return information about success of the operation). More...
 

Detailed Description

Definition of the interface between Data Clients (DC) and the Transformation Engine (TEK)

This header file conforms to the following standards:

  • ISO/IEC 9899:1990 (C90)
  • ISO/IEC 14882:1998 (C++98)

To ensure binary compatibility of the interface between different compilers and different versions of the interface, the struct offset of each struct member is verified at compile time. This check is realized by the TEK_SA_VERIFY_STRUCT_OFFSET macro.

Definition in file south_api.h.

Macro Definition Documentation

◆ TEK_SA_API_VERSION_MAJOR

#define TEK_SA_API_VERSION_MAJOR   0

Definition at line 19 of file south_api.h.

◆ TEK_SA_API_VERSION_MINOR

#define TEK_SA_API_VERSION_MINOR   1

Definition at line 20 of file south_api.h.

◆ TEK_SA_API_VERSION_PATCH

#define TEK_SA_API_VERSION_PATCH   0

Definition at line 21 of file south_api.h.

◆ TEK_SA_API_VERSION

#define TEK_SA_API_VERSION   "0.1.0"

Definition at line 22 of file south_api.h.