Transformation Engine API (south side)
south_api.h
Go to the documentation of this file.
1#ifndef TEK_SOUTH_API_H
2#define TEK_SOUTH_API_H
3
19#define TEK_SA_API_VERSION_MAJOR 0
20#define TEK_SA_API_VERSION_MINOR 1
21#define TEK_SA_API_VERSION_PATCH 0
22#define TEK_SA_API_VERSION "0.1.0"
23
24#include <stdarg.h>
25#include <stdbool.h>
26#include <stddef.h>
27#include <stdint.h>
28#include <stdlib.h>
29
30#define TEK_SA_STRUCT_ALIGN_SELECT(O32, O64) (sizeof(void*) == 8 ? O64 : O32)
31
32#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
33#include <assert.h>
34#define TEK_SA_VERIFY_STRUCT_OFFSET(S, M, O32, O64) \
35 ; \
36 _Static_assert(offsetof(struct S, M) == TEK_SA_STRUCT_ALIGN_SELECT(O32, O64), \
37 "struct offset of field " #M " in " #S " must be correct")
38#else
39#define TEK_SA_VERIFY_STRUCT_OFFSET(S, M, O32, O64) \
40 ; \
41 enum { \
42 S##__##M##_offset = \
43 1 / (int)(!!(offsetof(struct S, M) == TEK_SA_STRUCT_ALIGN_SELECT(O32, O64))) \
44 };
45#endif
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
236
237/**************************************************************************************************
238 * Configuration structures
239 *************************************************************************************************/
240
247 char* name;
248
250 char* content;
251};
252
253TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_additional_file, name, 0, 0);
254TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_additional_file, content, 4, 8);
255
262 char* config;
263
266
269};
270
271TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_configuration, config, 0, 0);
272TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_configuration, additional_files, 4, 8);
273TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_configuration, additional_files_count, 8, 16);
274
282};
283
284TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_configuration, request_timeout_ms, 0, 0);
285
286/**************************************************************************************************
287 * Built-in type definitions and variant
288 *************************************************************************************************/
289
298typedef int64_t tek_sa_type_handle;
299
305
312 uint32_t data1;
313
315 uint16_t data2;
316
318 uint16_t data3;
319
321 uint8_t data4[8];
322};
323TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_guid, data1, 0, 0);
324TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_guid, data2, 4, 4);
325TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_guid, data3, 6, 6);
326TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_guid, data4, 8, 8);
327
337 int32_t length;
338
340 unsigned char* data;
341};
342TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_byte_string, length, 0, 0);
343TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_byte_string, data, 4, 8);
344
355 int32_t length;
356
358 unsigned char* data;
359};
360TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_string, length, 0, 0);
361TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_string, data, 4, 8);
362
369typedef int64_t tek_sa_datetime;
370
381
388 uint32_t data_length;
389
396 unsigned char* data;
397};
398TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data, type, 0, 0);
399TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data, data_length, 8, 8);
400TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data, data, 12, 16);
401
416 uint32_t data_length;
417
423 unsigned char* data;
424};
425TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_array_item, data_length, 0, 0);
426TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_array_item, data, 4, 8);
427
437
440
444};
445
446TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_array, type, 0, 0);
447TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_array, number_of_items, 8, 8);
448TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_array, data, 12, 16);
449
459
467
482 uint32_t* dimensions;
483
487};
488TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_matrix, type, 0, 0);
489TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_matrix, dimension_length, 8, 8);
490TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_matrix, dimensions, 12, 16);
491TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_complex_data_matrix, data, 16, 24);
492
503
506
509
512
515
518
521
524
527
530
533
536
539
542
545
548
552
556
561
566 uint32_t length;
567
569 union {
570 bool* b;
571 uint8_t* ui8;
572 int8_t* i8;
573 uint16_t* ui16;
574 int16_t* i16;
575 uint32_t* ui32;
576 int32_t* i32;
577 uint64_t* ui64;
578 int64_t* i64;
579 float* f;
580 double* d;
581 tek_sa_datetime* dt;
582 struct tek_sa_string* s;
583 struct tek_sa_guid* guid;
584 struct tek_sa_byte_string* bs;
586};
587TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_variant_array, length, 0, 0);
588TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_variant_array, data, 4, 8);
589
595
609 uint32_t* dimensions;
610
613};
614TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_variant_matrix, dimension_length, 0, 0);
615TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_variant_matrix, dimensions, 4, 8);
616
630 uint8_t type;
631
633 union {
634 bool b;
635 uint8_t ui8;
636 int8_t i8;
637 uint16_t ui16;
638 int16_t i16;
639 uint32_t ui32;
640 int32_t i32;
641 uint64_t ui64;
642 int64_t i64;
643 float f;
644 double d;
646 struct tek_sa_string s;
647 struct tek_sa_guid guid;
648 struct tek_sa_byte_string bs;
649 struct tek_sa_variant_array array;
650 struct tek_sa_variant_matrix matrix;
651 struct tek_sa_complex_data complex;
652 struct tek_sa_complex_data_array complex_array;
653 struct tek_sa_complex_data_matrix complex_matrix;
655};
656TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_variant, type, 0, 0);
657TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_variant, data, 8, 8);
658
661
662/**************************************************************************************************
663 * Type definitions from data client to TEK
664 *************************************************************************************************/
665
671 char* name;
672
675};
676TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_struct_field_type_definition, name, 0, 0);
677TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_struct_field_type_definition, type, 8, 8);
678
684 char* name;
685
688
690 uint32_t item_count;
691};
692TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_struct_definition, name, 0, 0);
693TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_struct_definition, items, 4, 8);
694TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_struct_definition, item_count, 8, 16);
695
702 char* name;
703
705 int32_t value;
706};
707TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_enum_item_definition, name, 0, 0);
708TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_enum_item_definition, value, 4, 8);
709
715 char* name;
716
719
721 uint32_t item_count;
722};
723TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_enum_definition, name, 0, 0);
724TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_enum_definition, items, 4, 8);
725TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_enum_definition, item_count, 8, 16);
726
734 char const* name;
735
738};
739TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_method_argument_description, name, 0, 0);
740TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_method_argument_description, type, 4, 8);
741
742/**************************************************************************************************
743 * Handles and structures for data exchange
744 *************************************************************************************************/
745
750
753
756};
757
759typedef uint32_t tek_sa_field_handle;
760
762typedef uint32_t tek_sa_event_handle;
763
765typedef uint32_t tek_sa_alarm_handle;
766
768typedef uint32_t tek_sa_method_handle;
769
781typedef int TEK_SA_RESULT;
782
784#define TEK_SA_ERR_SUCCESS 0
785
795#define TEK_SA_ERR_NON_BLOCKING_IMPOSSIBLE 10
796
801#define TEK_SA_ERR_OUT_OF_MEMORY 11
802
804#define TEK_SA_ERR_INVALID_PARAMETER 12
805
816#define TEK_SA_ERR_RETRY_LATER 0xffffffff
817
819#define TEK_SA_READ_RESULT_STATUS_OK 0
820
822#define TEK_SA_READ_RESULT_STATUS_NOK 1
823
825#define TEK_SA_READ_RESULT_STATUS_TIMEOUT 2
826
829#define TEK_SA_READ_RESULT_STATUS_INVALID_HANDLE 3
830
837#define TEK_SA_BLOCK_TRANSFER_END_OF_FILE 26
838
846#define TEK_SA_BLOCK_TRANSFER_ABORT 24
852#define TEK_SA_ERR_UNSPECIFIED 1000
853
854/**************************************************************************************************
855 * Request and response structures
856 *************************************************************************************************/
857
863
866};
867TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_field_write_request, handle, 0, 0);
868TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_field_write_request, value, 8, 8);
869
874
877};
878TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_write_result, status, 0, 0);
879TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_write_result, handle, 4, 4);
880
886
889
897};
898TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_read_result, status, 0, 0);
899TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_read_result, handle, 4, 4);
900TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_read_result, value, 8, 8);
901
905 char const* name;
906
909};
910TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_event_parameter, name, 0, 0);
911TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_event_parameter, value, 8, 8);
912
923
938 int16_t severity;
939
950
960
963
966};
967TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_dc_event, timestamp, 0, 0);
968TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_dc_event, severity, 8, 8);
969TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_dc_event, event_type, 12, 12);
970TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_dc_event, source, 16, 16);
971TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_dc_event, number_of_parameters, 20, 20);
972TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_dc_event, parameters, 24, 24);
973
985};
986
993/**************************************************************************************************
994 * Data client capabilities
995 *************************************************************************************************/
996
1007
1013
1021};
1022
1042
1048};
1049TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_capabilities, number_of_inflight_calls, 0, 0);
1050TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_capabilities, threading_model, 4, 4);
1051
1076
1090
1097
1195 uint64_t request_id,
1196 const tek_sa_field_handle items_to_read[],
1197 uint32_t number_of_items,
1198 bool do_not_block);
1199
1219 uint64_t request_id,
1220 const struct tek_sa_field_write_request items_to_write[],
1221 uint32_t number_of_items,
1222 bool do_not_block);
1223
1246 uint64_t request_id,
1247 const char* filepath,
1248 uint64_t offset,
1249 int64_t length,
1250 bool do_not_block,
1251 int64_t* filesize);
1252
1273 uint64_t request_id,
1274 const char* filepath,
1275 uint64_t offset,
1276 int64_t length,
1277 bool do_not_block);
1278
1297 const tek_sa_field_handle items_to_subscribe[],
1298 uint32_t number_of_items);
1299
1311 const tek_sa_field_handle items_to_unsubscribe[],
1312 uint32_t number_of_items);
1313
1338 const tek_sa_method_handle method,
1339 uint64_t request_id,
1340 const tek_sa_field_value parameters[],
1341 const uint32_t number_of_parameters);
1342
1359
1370
1372};
1373TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, register_features, 0, 0);
1374TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, connect, 4, 8);
1375TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, free, 8, 16);
1376TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, read_fields, 12, 24);
1377TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, write_fields, 16, 32);
1378TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, block_read, 20, 40);
1379TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, block_write, 24, 48);
1380TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, subscribe, 28, 56);
1381TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, unsubscribe, 32, 64);
1382TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, invoke, 36, 72);
1383TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, acknowledge_alarm, 40, 80);
1384TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client, handle, 44, 88);
1385
1399
1418 struct tek_sa_data_client* created_client,
1419 struct tek_sa_data_client_capabilities* capabilities);
1420
1425};
1426TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_plugin, plugin_context, 0, 0);
1427TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_plugin, data_client_new, 4, 8);
1428TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_data_client_plugin, free_context, 8, 16);
1429
1459 const char* name,
1460 enum tek_sa_field_attributes attributes,
1461 enum tek_sa_variant_type type,
1462 tek_sa_field_handle* new_field_handle);
1463
1482 const char* name,
1483 struct tek_sa_method_argument_description input_parameter[],
1484 uint32_t number_of_input_parameters,
1485 struct tek_sa_method_argument_description output_parameter[],
1486 uint32_t number_of_output_parameters,
1487 tek_sa_method_handle* new_method_handle);
1488
1505 const char* name,
1506 tek_sa_event_handle* new_event_handle);
1507
1524 const char* name,
1525 const int16_t severity,
1526 const tek_sa_field_handle source,
1527 tek_sa_alarm_handle* new_alarm_handle);
1528
1548 struct tek_sa_enum_definition const* type_definition,
1549 tek_sa_type_handle* new_type_handle);
1550
1562 struct tek_sa_struct_definition const* type_definition,
1563 tek_sa_type_handle* new_type_handle);
1564
1582
1595
1605
1631 enum tek_sa_log_level_t lvl,
1632 const char* format,
1633 va_list args);
1634
1649
1658 struct tek_sa_data_client_capabilities const* capabilities);
1659
1680 uint64_t request_id,
1681 uint64_t progress);
1682
1705 uint64_t request_id,
1706 TEK_SA_RESULT result,
1707 const struct tek_sa_read_result results[],
1708 uint32_t number_of_results);
1709
1718 const struct tek_sa_read_result changes[],
1719 uint32_t number_of_changes);
1720
1732 uint64_t request_id,
1733 TEK_SA_RESULT result,
1734 const struct tek_sa_write_result results[],
1735 uint32_t number_of_results);
1736
1749 uint64_t request_id,
1750 TEK_SA_RESULT result,
1751 const tek_sa_field_value results[],
1752 uint32_t number_of_results);
1753
1771 uint64_t request_id,
1772 TEK_SA_RESULT result,
1773 unsigned char buffer[],
1774 uint32_t buffer_length);
1775
1791 uint64_t request_id,
1792 unsigned char buffer[],
1793 uint32_t buffer_length,
1794 uint32_t* bytes_written);
1795
1805 uint64_t request_id,
1806 TEK_SA_RESULT result);
1807
1809};
1810TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, register_field, 0, 0);
1811TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, register_method, 4, 8);
1812TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, register_event, 8, 16);
1813TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, register_alarm, 12, 24);
1814TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, register_enum_type, 16, 32);
1815TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, register_struct_type, 20, 40);
1816TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, post_event, 24, 48);
1817TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, set_alarm, 28, 56);
1818TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, reset_alarm, 32, 64);
1819TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, log, 36, 72);
1820TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, get_global_event, 40, 80);
1821TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, update_capabilities, 44, 88);
1822TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, read_progress, 48, 96);
1823TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, read_result, 52, 104);
1824TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, notify_change, 56, 112);
1825TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, write_result, 60, 120);
1826TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, call_method_result, 64, 128);
1827TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, block_read_data, 68, 136);
1828TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, block_write_data, 72, 144);
1829TEK_SA_VERIFY_STRUCT_OFFSET(tek_sa_transformation_engine, block_write_result, 76, 152);
1830
1847 struct tek_sa_transformation_engine* api,
1848 const struct tek_sa_data_client_configuration* plugin_configuration,
1849 struct tek_sa_data_client_plugin* plugin,
1850 struct tek_sa_configuration* tek_configuration);
1851
1852#ifdef TEK_SA_DATA_CLIENT_IMPL
1853
1854#ifdef _WIN32
1855#define TEK_SA_API_EXPORT __declspec(dllexport) __stdcall
1856#else
1857#define TEK_SA_API_EXPORT __attribute__((__visibility__("default")))
1858#endif
1859
1863TEK_SA_RESULT TEK_SA_API_EXPORT
1864load_plugin(struct tek_sa_transformation_engine* api,
1865 const struct tek_sa_data_client_configuration* plugin_configuration,
1866 struct tek_sa_data_client_plugin* plugin,
1867 struct tek_sa_configuration* tek_configuration);
1868
1869#endif
1870
1871#ifdef __cplusplus
1872}
1873#endif
1874
1875#undef TEK_SA_STRUCT_ALIGN_SELECT
1876#undef TEK_SA_VERIFY_STRUCT_OFFSET
1877
1878#endif /* TEK_SOUTH_API_H */
enum tek_sa_threading_model threading_model
Requirements for the thread calling any communication function in the data client API.
Definition: south_api.h:1047
uint32_t number_of_inflight_calls
Number of uncompleted async api calls. Unlimited number of uncompleted calls are signaled using 0 A b...
Definition: south_api.h:1041
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.
Definition: south_api.h:1846
tek_sa_threading_model
Describes the threading model of a data client instance of a data client plugin.
Definition: south_api.h:1001
void * tek_sa_data_client_handle
The type of the data client handle.
Definition: south_api.h:235
@ TEK_SA_THREADING_MODEL_SAME_THREAD
The same thread must always be used to call the data client instance.
Definition: south_api.h:1006
@ TEK_SA_THREADING_MODEL_PARALLEL
DLL is thread safe, multiple parallel calls are allowed.
Definition: south_api.h:1020
@ TEK_SA_THREADING_MODEL_SEQUENTIAL
Only one thread of a thread pool is doing a single call at a time at the data client instance.
Definition: south_api.h:1012
capabilities of the data client. These capabilities are applied to the complete data client as well a...
Definition: south_api.h:1031
uint16_t data3
The Data3 field.
Definition: south_api.h:318
uint32_t data1
The Data1 field.
Definition: south_api.h:312
uint32_t item_count
The number of defined enum values.
Definition: south_api.h:721
uint32_t data_length
The number of bytes in the data field.
Definition: south_api.h:388
tek_sa_type_handle type
The type handle of the registered type of the array items.
Definition: south_api.h:436
unsigned char * data
The bytes of the serialized value.
Definition: south_api.h:423
uint32_t * dimensions
The array dimensions.
Definition: south_api.h:482
char const * name
The name of the method parameter.
Definition: south_api.h:734
tek_sa_type_handle type
The type handle of the registered data type.
Definition: south_api.h:380
uint8_t type
The type of the value.
Definition: south_api.h:630
uint32_t data_length
The number of bytes in the data field.
Definition: south_api.h:416
uint32_t length
The number of elements in the array.
Definition: south_api.h:566
char const * name
The name of the parameter.
Definition: south_api.h:905
struct tek_sa_complex_data_array_item * data
The array data, which consists of the concatenation of all serialized items.
Definition: south_api.h:443
TEK_SA_RESULT status
The read operation result.
Definition: south_api.h:885
struct tek_sa_variant_array data
The array values.
Definition: south_api.h:612
uint32_t number_of_parameters
The number of event parameters.
Definition: south_api.h:962
uint16_t data2
The Data2 field.
Definition: south_api.h:315
struct tek_sa_struct_field_type_definition * items
The definition of the record fields.
Definition: south_api.h:687
union tek_sa_variant_array::@0 data
The array values.
char * name
The name of the type.
Definition: south_api.h:684
tek_sa_field_value value
The value of the event parameter.
Definition: south_api.h:908
uint32_t number_of_items
The number of items in the array.
Definition: south_api.h:439
tek_sa_event_handle event_type
The event type handle as returned by the call to tek_sa_transformation_engine::register_event.
Definition: south_api.h:949
char * name
The name of the enum item.
Definition: south_api.h:702
enum tek_sa_variant_type type
The type of the method parameter.
Definition: south_api.h:737
uint32_t request_timeout_ms
Definition: south_api.h:281
tek_sa_field_value value
The value to be written to the field.
Definition: south_api.h:865
unsigned char * data
The UTF-8 encoded characters of the string.
Definition: south_api.h:358
tek_sa_field_value value
The read value.
Definition: south_api.h:896
uint32_t item_count
The number of fields in the record type.
Definition: south_api.h:690
tek_sa_field_handle handle
The field handle as returned from tek_sa_transformation_engine::register_field.
Definition: south_api.h:862
int32_t length
The length of the byte string.
Definition: south_api.h:337
struct tek_sa_additional_file * additional_files
Definition: south_api.h:265
char * name
The name of the data field.
Definition: south_api.h:671
tek_sa_field_handle source
The handle of the source of the event.
Definition: south_api.h:959
tek_sa_field_handle handle
The handle of the field written.
Definition: south_api.h:876
uint32_t dimension_length
The number of array dimensions.
Definition: south_api.h:594
uint32_t dimension_length
The number of dimensions in the array.
Definition: south_api.h:466
tek_sa_field_handle handle
The handle of the read field.
Definition: south_api.h:888
tek_sa_type_handle type
The type handle of the registered type of the array items.
Definition: south_api.h:458
int32_t value
The numeric value of the enum item.
Definition: south_api.h:705
struct tek_sa_enum_item_definition * items
The defined enum values of this type.
Definition: south_api.h:718
struct tek_sa_complex_data_array_item * data
The array data, which consists of the concatenation of all serialized items.
Definition: south_api.h:486
int32_t length
The length of the byte string.
Definition: south_api.h:355
int16_t severity
The severity level of the event.
Definition: south_api.h:938
struct tek_sa_event_parameter * parameters
The event parameters.
Definition: south_api.h:965
union tek_sa_variant::@1 data
The value.
uint32_t * dimensions
The array dimensions.
Definition: south_api.h:609
tek_sa_type_handle_or_type_enum type
The type of the field, represented as type_handle or type enum.
Definition: south_api.h:674
unsigned char * data
The bytes of the serialized value.
Definition: south_api.h:396
tek_sa_datetime timestamp
The Timestamp of the event.
Definition: south_api.h:922
TEK_SA_RESULT status
The write operation result.
Definition: south_api.h:873
char * name
The name of the type.
Definition: south_api.h:715
uint8_t data4[8]
The Data4 field.
Definition: south_api.h:321
unsigned char * data
Definition: south_api.h:340
int64_t tek_sa_type_handle
The type of a handle which is returned for user defined types.
Definition: south_api.h:298
tek_sa_variant_type
The predefined types which can be processed in the TE.
Definition: south_api.h:500
tek_sa_field_attributes
Flags type which contains the attributes of a data client field.
Definition: south_api.h:747
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) ...
Definition: south_api.h:304
uint32_t tek_sa_alarm_handle
Handle type for an alarm definition.
Definition: south_api.h:765
uint32_t tek_sa_method_handle
Handle type for a method definition.
Definition: south_api.h:768
uint32_t tek_sa_field_handle
Handle type for a field definition.
Definition: south_api.h:759
int64_t tek_sa_datetime
The type of date and time values wen used as a field type.
Definition: south_api.h:369
int TEK_SA_RESULT
The return value type of all interface functions (which need to return information about success of t...
Definition: south_api.h:781
uint32_t tek_sa_event_handle
Handle type for an event definition.
Definition: south_api.h:762
tek_sa_log_level_t
Definition of the possible logging levels which can be used in tek_sa_transformation_engine::log.
Definition: south_api.h:978
@ TEK_SA_VARIANT_TYPE_UINT8_T
The type id of an unsigned byte value.
Definition: south_api.h:508
@ TEK_SA_VARIANT_TYPE_INT16_T
The type id of a signed short value.
Definition: south_api.h:517
@ TEK_SA_VARIANT_TYPE_UINT16_T
The type id of an unsigned short value.
Definition: south_api.h:514
@ TEK_SA_VARIANT_TYPE_UINT32_T
The type id of an unsigned 32bit integer value.
Definition: south_api.h:520
@ TEK_SA_VARIANT_TYPE_FLAG_MATRIX
The flag which is set to declare an array with more than one dimension of the base type.
Definition: south_api.h:559
@ TEK_SA_VARIANT_TYPE_GUID
The type id of a GUID value. See tek_sa_guid.
Definition: south_api.h:544
@ TEK_SA_VARIANT_TYPE_NULL
The invalid type id.
Definition: south_api.h:502
@ TEK_SA_VARIANT_TYPE_BYTE_STRING
The type id of a byte string value. See tek_sa_byte_string.
Definition: south_api.h:547
@ TEK_SA_VARIANT_TYPE_STRING
The type id of a string value. See tek_sa_string.
Definition: south_api.h:541
@ TEK_SA_VARIANT_TYPE_DOUBLE
The type id of a 64bit floating point value.
Definition: south_api.h:535
@ TEK_SA_VARIANT_TYPE_INT64_T
The type id of a signed 64bit integer value.
Definition: south_api.h:529
@ TEK_SA_VARIANT_TYPE_BOOL
The type id of a bool value.
Definition: south_api.h:505
@ TEK_SA_VARIANT_TYPE_DATETIME
The type id of a date and time value. See tek_sa_datetime.
Definition: south_api.h:538
@ TEK_SA_VARIANT_TYPE_FLOAT
The type id of a 32bit floating point value.
Definition: south_api.h:532
@ TEK_SA_VARIANT_TYPE_FLAG_ARRAY
The flag which is set to declare an array with one dimension of the base type.
Definition: south_api.h:555
@ TEK_SA_VARIANT_TYPE_COMPLEX
The type id of a value with a complex data type. See tek_sa_transformation_engine::register_struct_ty...
Definition: south_api.h:551
@ TEK_SA_VARIANT_TYPE_INT32_T
The type id of a signed 32bit integer value value.
Definition: south_api.h:523
@ TEK_SA_VARIANT_TYPE_UINT64_T
The type id of an unsigned 64bit integer value.
Definition: south_api.h:526
@ TEK_SA_VARIANT_TYPE_INT8_T
The type id of a signed byte value.
Definition: south_api.h:511
@ TEK_SA_FIELD_ATTRIBUTES_WRITABLE
The attribute to mark a field as writeable.
Definition: south_api.h:749
@ TEK_SA_FIELD_ATTRIBUTES_READABLE
The attribute to mark a field as readable.
Definition: south_api.h:752
@ TEK_SA_FIELD_ATTRIBUTES_SUBSCRIBABLE
The attribute to mark a field which can be subscribed to.
Definition: south_api.h:755
@ TEK_SA_LOG_LEVEL_ERROR
Definition: south_api.h:983
@ TEK_SA_LOG_LEVEL_WARNING
Definition: south_api.h:982
@ TEK_SA_LOG_LEVEL_DEBUG
Definition: south_api.h:980
@ TEK_SA_LOG_LEVEL_INFO
Definition: south_api.h:981
@ TEK_SA_LOG_LEVEL_CRITICAL
Definition: south_api.h:984
@ TEK_SA_LOG_LEVEL_TRACE
Definition: south_api.h:979
Configuration class which describes an additional file which is passed to the data client.
Definition: south_api.h:245
The representation of a byte array with variable length when used as a field type.
Definition: south_api.h:335
The representation of a field value which has a type which is not a predefined type.
Definition: south_api.h:378
The representation of an array of complex data with exactly one dimension.
Definition: south_api.h:434
The representation of the items of an array of complex data values with exactly one dimension.
Definition: south_api.h:408
The representation of array of complex data with more than one dimension.
Definition: south_api.h:456
Configuration struct that contains generic properties and settings for TEK instance.
Definition: south_api.h:278
Configuration object containing the contents of the configuration files for the tek_sa_data_client_pl...
Definition: south_api.h:260
An event which may be sent from the data client to tek_sa_transformation_engine::post_event.
Definition: south_api.h:915
The type definition of a user defined enum type.
Definition: south_api.h:713
The definition of an enum item which is defined in a user defined enum type.
Definition: south_api.h:700
Structure to encapsulate an event parameter.
Definition: south_api.h:903
Structure to encapsulate the parameters of a write field request.
Definition: south_api.h:859
The representation of a GUID when used as a field type.
Definition: south_api.h:310
The description of a method parameter.
Definition: south_api.h:732
Structure to encapsulate the result of a read operation of a single field.
Definition: south_api.h:883
The representation of a string with variable length when used as a field type.
Definition: south_api.h:353
The type definition of a user defined record type.
Definition: south_api.h:682
The type definition of a record field in a user defined struct type.
Definition: south_api.h:669
The representation of a single value (which may be of array type too).
Definition: south_api.h:624
The representation of a one dimensional array of the supported base types.
Definition: south_api.h:564
The representation of an array with more than one dimension of the supported base types.
Definition: south_api.h:592
Structure to encapsulate the result of a write field request.
Definition: south_api.h:871
Interface of the data client plugin.
Definition: south_api.h:1393
void * plugin_context
The (private) plugin context. Must be freed using free_context on unloading the plugin.
Definition: south_api.h:1398
TEK_SA_RESULT(* data_client_new)(void *plugin_context, const struct tek_sa_data_client_configuration *config, struct tek_sa_data_client *created_client, struct tek_sa_data_client_capabilities *capabilities)
Allocates and initializes the data client with a configuration. Prepare callbacks in data_client.
Definition: south_api.h:1416
void(* free_context)(void *plugin_context)
Frees the private context of the plugin.
Definition: south_api.h:1424
The interface of one instance of a data client.
Definition: south_api.h:1057
TEK_SA_RESULT(* connect)(tek_sa_data_client_handle dc)
Connect the data client to the data source.
Definition: south_api.h:1089
TEK_SA_RESULT(* block_write)(const tek_sa_data_client_handle dc, uint64_t request_id, const char *filepath, uint64_t offset, int64_t length, bool do_not_block)
Start a block transfer from the TEK to the data client.
Definition: south_api.h:1272
TEK_SA_RESULT(* subscribe)(tek_sa_data_client_handle dc, const tek_sa_field_handle items_to_subscribe[], uint32_t number_of_items)
Subscribe to changes of one ore more data client fields.
Definition: south_api.h:1296
TEK_SA_RESULT(* write_fields)(tek_sa_data_client_handle dc, uint64_t request_id, const struct tek_sa_field_write_request items_to_write[], uint32_t number_of_items, bool do_not_block)
Function to write values to data client fields.
Definition: south_api.h:1218
TEK_SA_RESULT(* read_fields)(tek_sa_data_client_handle dc, uint64_t request_id, const tek_sa_field_handle items_to_read[], uint32_t number_of_items, bool do_not_block)
Function to read one or more fields from the data client. The call may be executed in a synchronous o...
Definition: south_api.h:1194
TEK_SA_RESULT(* block_read)(const tek_sa_data_client_handle dc, uint64_t request_id, const char *filepath, uint64_t offset, int64_t length, bool do_not_block, int64_t *filesize)
Starts a block transfer from the client to the TEK.
Definition: south_api.h:1245
TEK_SA_RESULT(* acknowledge_alarm)(tek_sa_data_client_handle dc, const tek_sa_alarm_handle alarm)
Acknowledge an alarm in the data client.
Definition: south_api.h:1358
TEK_SA_RESULT(* invoke)(const tek_sa_data_client_handle dc, const tek_sa_method_handle method, uint64_t request_id, const tek_sa_field_value parameters[], const uint32_t number_of_parameters)
Invoke a method on the data client.
Definition: south_api.h:1337
tek_sa_data_client_handle handle
The handle that is passed as first parameter in all functions of this interface.
Definition: south_api.h:1369
void(* free)(tek_sa_data_client_handle dc)
Frees the data client and releases all its resources.
Definition: south_api.h:1096
TEK_SA_RESULT(* register_features)(tek_sa_data_client_handle dc)
Register all known features of the data client.
Definition: south_api.h:1075
TEK_SA_RESULT(* unsubscribe)(tek_sa_data_client_handle dc, const tek_sa_field_handle items_to_unsubscribe[], uint32_t number_of_items)
Unsubscribe to changes of one ore more data client fields.
Definition: south_api.h:1310
Interface ot the Transformation Engine.
Definition: south_api.h:1440
TEK_SA_RESULT(* notify_change)(tek_sa_data_client_handle dc, const struct tek_sa_read_result changes[], uint32_t number_of_changes)
Callback to notify about a change of subscribed data fields.
Definition: south_api.h:1717
TEK_SA_RESULT(* read_progress)(tek_sa_data_client_handle dc, uint64_t request_id, uint64_t progress)
Callback to signal progress of a read operation to the TEK.
Definition: south_api.h:1679
TEK_SA_RESULT(* register_event)(tek_sa_data_client_handle dc, const char *name, tek_sa_event_handle *new_event_handle)
Registers a new Event that a data client might raise.
Definition: south_api.h:1504
tek_sa_event_handle(* get_global_event)(const char *name)
Get a handle of a globally defined event.
Definition: south_api.h:1648
TEK_SA_RESULT(* set_alarm)(tek_sa_data_client_handle dc, const tek_sa_alarm_handle alarm)
Sets an alarm.
Definition: south_api.h:1594
TEK_SA_RESULT(* register_field)(tek_sa_data_client_handle dc, const char *name, enum tek_sa_field_attributes attributes, enum tek_sa_variant_type type, tek_sa_field_handle *new_field_handle)
Registers a new field of a data client with a name inside the TEK.
Definition: south_api.h:1458
TEK_SA_RESULT(* block_write_result)(tek_sa_data_client_handle dc, uint64_t request_id, TEK_SA_RESULT result)
Callback from the data client to the TEK with the final result of the block transfer.
Definition: south_api.h:1804
TEK_SA_RESULT(* log)(tek_sa_data_client_handle source, enum tek_sa_log_level_t lvl, const char *format, va_list args)
Logging function for data clients.
Definition: south_api.h:1630
TEK_SA_RESULT(* post_event)(tek_sa_data_client_handle dc, struct tek_sa_dc_event const *event)
Post an event which was declared with a call to either get_global_event or register_event.
Definition: south_api.h:1581
TEK_SA_RESULT(* register_alarm)(tek_sa_data_client_handle dc, const char *name, const int16_t severity, const tek_sa_field_handle source, tek_sa_alarm_handle *new_alarm_handle)
Registers an alarm at the TEK.
Definition: south_api.h:1523
TEK_SA_RESULT(* read_result)(tek_sa_data_client_handle dc, uint64_t request_id, TEK_SA_RESULT result, const struct tek_sa_read_result results[], uint32_t number_of_results)
Callback of the data client read operation.
Definition: south_api.h:1704
TEK_SA_RESULT(* call_method_result)(tek_sa_data_client_handle dc, uint64_t request_id, TEK_SA_RESULT result, const tek_sa_field_value results[], uint32_t number_of_results)
Callback of a data client method call.
Definition: south_api.h:1748
TEK_SA_RESULT(* reset_alarm)(tek_sa_data_client_handle dc, const tek_sa_alarm_handle alarm)
Clears/resets an alarm.
Definition: south_api.h:1604
TEK_SA_RESULT(* register_struct_type)(tek_sa_data_client_handle dc, struct tek_sa_struct_definition const *type_definition, tek_sa_type_handle *new_type_handle)
Register a user defined struct type.
Definition: south_api.h:1561
TEK_SA_RESULT(* block_read_data)(tek_sa_data_client_handle dc, uint64_t request_id, TEK_SA_RESULT result, unsigned char buffer[], uint32_t buffer_length)
Callback from the data client to the TEK signaling the next data chunk of the block transfer.
Definition: south_api.h:1770
TEK_SA_RESULT(* write_result)(tek_sa_data_client_handle dc, uint64_t request_id, TEK_SA_RESULT result, const struct tek_sa_write_result results[], uint32_t number_of_results)
Callback of the data client write operation.
Definition: south_api.h:1731
TEK_SA_RESULT(* register_enum_type)(tek_sa_data_client_handle dc, struct tek_sa_enum_definition const *type_definition, tek_sa_type_handle *new_type_handle)
Register a user defined enum type.
Definition: south_api.h:1547
TEK_SA_RESULT(* register_method)(tek_sa_data_client_handle dc, const char *name, struct tek_sa_method_argument_description input_parameter[], uint32_t number_of_input_parameters, struct tek_sa_method_argument_description output_parameter[], uint32_t number_of_output_parameters, tek_sa_method_handle *new_method_handle)
Registers a new method at the TEK.
Definition: south_api.h:1481
TEK_SA_RESULT(* block_write_data)(tek_sa_data_client_handle dc, uint64_t request_id, unsigned char buffer[], uint32_t buffer_length, uint32_t *bytes_written)
Callback from the data client to the TEK requesting another chunk to write to the data client.
Definition: south_api.h:1790
TEK_SA_RESULT(* update_capabilities)(tek_sa_data_client_handle dc, struct tek_sa_data_client_capabilities const *capabilities)
Notifies the TEK of the change of the client's capabilities.
Definition: south_api.h:1657