libtase2  2.4.0
TASE.2/ICCP Protocol Source Code Library for C/C++
Loading...
Searching...
No Matches
tase2_common.h
Go to the documentation of this file.
1/*
2 * tase2_common.h
3 *
4 * This file is part of libtase2
5 *
6 * Copyright 2017-2020 MZ Automation GmbH
7 *
8 * All rights reserved.
9 */
10
11#ifndef SRC_TASE2_COMMON_TASE2_COMMON_H_
12#define SRC_TASE2_COMMON_TASE2_COMMON_H_
13
14#include <stdint.h>
15#include <stdbool.h>
16#include "tase2_api_exports.h"
17#include "tase2_endpoint.h"
18#include "linked_list.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
58
66
70typedef void
71(*Tase2_Log_Function) (int logLevel, const char* message);
72
73typedef void
74(*Tase2_Log_FunctionEx) (Tase2_LogLevel logLevel, Tase2_LogSource source, Tase2_Endpoint endpoint, Tase2_Endpoint_Connection peer, const char* message);
75
83TASE2_API void
85
96TASE2_API void
98
99TASE2_API void
101
107TASE2_API const char*
109
113TASE2_API int
115
119TASE2_API int
121
125TASE2_API int
127
131typedef struct {
132 uint64_t messagesSent;
133 uint64_t messagesRcvd;
134 uint64_t errors;
136
143
148
165
221
233#define TASE2_COMMAND_TRIP 0
234
238#define TASE2_COMMAND_CLOSE 1
239#define TASE2_COMMAND_OPEN 0
240#define TASE2_COMMAND_OFF 0
241#define TASE2_COMMAND_ON 1
242#define TASE2_COMMAND_LOWER 0
243#define TASE2_COMMAND_RAISE 1
244
253#define TASE2_SUPPORTED_FB_1 1
254#define TASE2_SUPPORTED_FB_2 2
255#define TASE2_SUPPORTED_FB_3 4
256#define TASE2_SUPPORTED_FB_4 8
257#define TASE2_SUPPORTED_FB_5 16
258
269#define TASE2_DS_CONDITION_INTERVAL 1
270
274#define TASE2_DS_CONDITION_INTEGRITY 2
275
279#define TASE2_DS_CONDITION_CHANGE 4
280
284#define TASE2_DS_CONDITION_OPERATOR_REQUESTED 8
285
289#define TASE2_DS_CONDITION_EXTERNAL_EVENT 16
290
306
315
367
368
369typedef struct sTase2_PointName* Tase2_PointName;
370
372 char domainName[33];
373 char pointName[33];
374};
375
388typedef struct sTase2_PointValue* Tase2_PointValue;
389
397TASE2_API Tase2_PointValueType
399
407TASE2_API Tase2_ClientError
409
423TASE2_API void
425
433TASE2_API void
435
436/********************************************************
437 * Types and functions for indication point types
438 *********************************************************/
439
440typedef uint8_t Tase2_DataFlags;
441
442#define TASE2_DATA_FLAGS_UNUSED_0 1
443#define TASE2_DATA_FLAGS_UNUSED_1 2
444#define TASE2_DATA_FLAGS_VALIDITY_HI 4
445#define TASE2_DATA_FLAGS_VALIDITY_LO 8
446#define TASE2_DATA_FLAGS_CURRENT_SOURCE_HI 16
447#define TASE2_DATA_FLAGS_CURRENT_SOURCE_LO 32
448#define TASE2_DATA_FLAGS_NORMAL_VALUE 64
449#define TASE2_DATA_FLAGS_TIME_STAMP_QUALITY 128
450
451typedef uint8_t Tase2_DataState;
452
453#define TASE2_DATA_STATE_HI 1
454#define TASE2_DATA_STATE_LO 2
455#define TASE2_DATA_STATE_VALIDITY_HI 4
456#define TASE2_DATA_STATE_VALIDITY_LO 8
457#define TASE2_DATA_STATE_CURRENT_SOURCE_HI 16
458#define TASE2_DATA_STATE_CURRENT_SOURCE_LO 32
459#define TASE2_DATA_STATE_NORMAL_VALUE 64
460#define TASE2_DATA_STATE_TIME_STAMP_QUALITY 128
461
462#define TASE2_DATA_STATE_BETWEEN 0
463#define TASE2_DATA_STATE_TRIPPED 2
464#define TASE2_DATA_STATE_OFF 2
465#define TASE2_DATA_STATE_CLOSED 1
466#define TASE2_DATA_STATE_ON 1
467#define TASE2_DATA_STATE_INVALID 3
468
469#define TASE2_DATA_FLAGS_VALIDITY_VALID 0
470#define TASE2_DATA_FLAGS_VALIDITY_HELD 8
471#define TASE2_DATA_FLAGS_VALIDITY_SUSPECT 4
472#define TASE2_DATA_FLAGS_VALIDITY_NOTVALID 12
473
474#define TASE2_DATA_FLAGS_CURRENT_SOURCE_TELEMETERED 0
475#define TASE2_DATA_FLAGS_CURRENT_SOURCE_CALCULATED 32
476#define TASE2_DATA_FLAGS_CURRENT_SOURCE_ENTERED 16
477#define TASE2_DATA_FLAGS_CURRENT_SOURCE_ESTIMATED 48
478
480
481#define TASE2_DATA_SUPPL_STATE_HI 1
482#define TASE2_DATA_SUPPL_STATE_LO 2
483#define TASE2_DATA_SUPPL_STATE_TAG_HI 4
484#define TASE2_DATA_SUPPL_STATE_TAG_LO 8
485#define TASE2_DATA_SUPPL_STATE_EXPECTED_HI 16
486#define TASE2_DATA_SUPPL_STATE_EXPECTED_LO 32
487
492
498TASE2_API Tase2_PointValue
500
508TASE2_API Tase2_PointValue
510
518TASE2_API Tase2_PointValue
520
528TASE2_API Tase2_PointValue
530
538TASE2_API Tase2_PointValue
540
549TASE2_API Tase2_PointValue
551
560TASE2_API Tase2_PointValue
562
571TASE2_API Tase2_PointValue
573
582TASE2_API Tase2_PointValue
584
594TASE2_API Tase2_PointValue
595Tase2_PointValue_createRealQTimeTag(float value, Tase2_DataFlags flags, int32_t timeTag);
596
605TASE2_API Tase2_PointValue
607
617TASE2_API Tase2_PointValue
618Tase2_PointValue_createDiscreteQTimeTag(int32_t value, Tase2_DataFlags flags, int32_t timeTag);
619
629TASE2_API Tase2_PointValue
631
642TASE2_API Tase2_PointValue
643Tase2_PointValue_createRealExtended(float value, Tase2_DataFlags flags, int32_t timeTag, uint16_t cov);
644
654TASE2_API Tase2_PointValue
655Tase2_PointValue_createStateExtended(Tase2_DataFlags valueAndFlags, int32_t timeTag, uint16_t cov);
656
667TASE2_API Tase2_PointValue
668Tase2_PointValue_createDiscreteExtended(int32_t value, Tase2_DataFlags flags, int32_t timeTag, uint16_t cov);
669
680TASE2_API Tase2_PointValue
682
692TASE2_API Tase2_PointValue
693Tase2_PointValue_createRealQTimeTagExtended(float value, Tase2_DataFlags flags, uint64_t timeTagExtended);
694
704TASE2_API Tase2_PointValue
705Tase2_PointValue_createStateQTimeTagExtended(Tase2_DataFlags valueAndFlags, uint64_t timeTagExtended);
706
716TASE2_API Tase2_PointValue
717Tase2_PointValue_createDiscreteQTimeTagExtended(int32_t value, Tase2_DataFlags flags, uint64_t timeTagExtended);
718
728TASE2_API Tase2_PointValue
730
738TASE2_API float
740
751TASE2_API float
753
760TASE2_API void
762
773TASE2_API Tase2_PointValueError
775
783TASE2_API int32_t
785
796TASE2_API int32_t
798
805TASE2_API void
807
818TASE2_API Tase2_PointValueError
820
827TASE2_API Tase2_DataState
829
840TASE2_API Tase2_DataState
842
849TASE2_API void
851
862TASE2_API Tase2_PointValueError
864
874
887
894TASE2_API void
896
907TASE2_API Tase2_PointValueError
909
918TASE2_API bool
920
929TASE2_API Tase2_TimeStampClass
931
941TASE2_API uint64_t
943
956TASE2_API uint64_t
958
966TASE2_API void
968
979TASE2_API Tase2_PointValueError
981
991TASE2_API Tase2_DataFlags
993
1006TASE2_API Tase2_DataFlags
1008
1018TASE2_API void
1032TASE2_API Tase2_PointValueError
1034
1044TASE2_API uint16_t
1046
1059TASE2_API uint16_t
1061
1070TASE2_API void
1072
1085TASE2_API Tase2_PointValueError
1087
1088/********************************************************
1089 * Types and functions for protection event types
1090 *********************************************************/
1091
1093
1094#define TASE2_SINGLE_FLAGS_ELAPSED_TIME_VALIDITY 1
1095#define TASE2_SINGLE_FLAGS_BLOCKED 2
1096#define TASE2_SINGLE_FLAGS_SUBSTITUTED 4
1097#define TASE2_SINGLE_FLAGS_TOPICAL 8
1098#define TASE2_SINGLE_FLAGS_EVENT_VALIDITY 16
1099#define TASE2_SINGLE_FLAGS_UNUSED 32
1100#define TASE2_SINGLE_FLAGS_EVENT_STATE_HI 64
1101#define TASE2_SINGLE_FLAGS_EVENT_STATE_LO 128
1102
1103typedef uint8_t Tase2_EventFlags;
1104
1105#define TASE2_EVENT_FLAGS_GENERAL 1
1106#define TASE2_EVENT_FLAGS_PHASE_1 2
1107#define TASE2_EVENT_FLAGS_PHASE_2 4
1108#define TASE2_EVENT_FLAGS_PHASE_3 8
1109#define TASE2_EVENT_FLAGS_EARTH 16
1110#define TASE2_EVENT_FLAGS_REVERSE 32
1111
1113
1114#define TASE2_PACKED_FLAGS_ELAPSED_TIME_VALIDITY 1
1115#define TASE2_PACKED_FLAGS_BLOCKED 2
1116#define TASE2_PACKED_FLAGS_SUBSTITUTED 4
1117#define TASE2_PACKED_FLAGS_TOPICAL 8
1118#define TASE2_PACKED_FLAGS_EVENT_VALIDITY 16
1119
1129TASE2_API Tase2_PointValue
1130Tase2_PointValue_createSingleProtectionEvent(Tase2_SingleEventFlags eventFlags, int32_t operatingTime, uint64_t eventTime);
1131
1142TASE2_API Tase2_PointValue
1143Tase2_PointValue_createPackedProtectionEvent(Tase2_EventFlags packedEvent, Tase2_PackedEventFlags packedEventFlags, int32_t operatingTime, uint64_t eventTime);
1144
1154TASE2_API Tase2_SingleEventFlags
1156
1169TASE2_API Tase2_SingleEventFlags
1171
1180TASE2_API void
1182
1195TASE2_API Tase2_PointValueError
1197
1207TASE2_API Tase2_EventFlags
1209
1222TASE2_API Tase2_EventFlags
1224
1233TASE2_API void
1235
1250
1260TASE2_API Tase2_PackedEventFlags
1262
1275TASE2_API Tase2_PackedEventFlags
1277
1286TASE2_API void
1288
1301TASE2_API Tase2_PointValueError
1303
1311TASE2_API int32_t
1313
1324TASE2_API int32_t
1326
1333TASE2_API void
1335
1346TASE2_API Tase2_PointValueError
1348
1356TASE2_API uint64_t
1358
1369TASE2_API uint64_t
1371
1378TASE2_API void
1380
1391TASE2_API Tase2_PointValueError
1393
1398#ifdef __cplusplus
1399}
1400#endif
1401
1402#endif /* SRC_TASE2_COMMON_TASE2_COMMON_H_ */
TASE2_API void Tase2_Library_setLogLevel(Tase2_LogLevel level)
Set the library log level.
TASE2_API const char * Tase2_Library_getVersionString()
Get the version string of the library (e.g. "1.2.3")
TASE2_API int Tase2_Library_getMajorVersion()
Get the major version of the library.
void(* Tase2_Log_Function)(int logLevel, const char *message)
User provided log message handler (optional)
Definition tase2_common.h:71
TASE2_API void Tase2_Library_setLogFunction(Tase2_Log_Function logFunction)
Set a user provided log message handler.
Tase2_ClientError
Client side error code.
Definition tase2_common.h:169
Tase2_IndicationPointType
Definition tase2_common.h:137
Tase2_TagValue
Definition tase2_common.h:293
TASE2_API void Tase2_Library_setLogFunctionEx(Tase2_Log_FunctionEx logFunction)
void(* Tase2_Log_FunctionEx)(Tase2_LogLevel logLevel, Tase2_LogSource source, Tase2_Endpoint endpoint, Tase2_Endpoint_Connection peer, const char *message)
Definition tase2_common.h:74
struct sTase2_Endpoint_Connection * Tase2_Endpoint_Connection
Represents a connection to another connected TASE.2 endpoint.
Definition tase2_endpoint.h:37
Tase2_LogSource
Definition tase2_common.h:59
Tase2_QualityClass
Definition tase2_common.h:144
Tase2_PointValueType
Definition tase2_common.h:316
TASE2_API int Tase2_Library_getMinorVersion()
Get the minor version of the library.
TASE2_API int Tase2_Library_getPatchVersion()
Get the patch version of the library.
Tase2_LogLevel
Specify the log level for the library internal logging.
Definition tase2_common.h:32
struct sTase2_Endpoint * Tase2_Endpoint
A TASE.2 endpoint that can be configured as passive (TCP server) or active (TCP client)
Definition tase2_endpoint.h:32
Tase2_ReportReason
Definition tase2_common.h:308
Tase2_TimeStampClass
Definition tase2_common.h:149
@ TASE2_CLIENT_ERROR_OBJECT_NOT_EXISTING
Definition tase2_common.h:214
@ TASE2_CLIENT_ERROR_OTHER
Definition tase2_common.h:209
@ TASE2_CLIENT_ERROR_TIMEOUT
Definition tase2_common.h:184
@ TASE2_CLIENT_ERROR_OK
Definition tase2_common.h:174
@ TASE2_CLIENT_ERROR_TEMPORARILY_UNAVAILABLE
Definition tase2_common.h:194
@ TASE2_CLIENT_ERROR_FAILED
Definition tase2_common.h:179
@ TASE2_CLIENT_ERROR_INVALID_ARGUMENT
Definition tase2_common.h:199
@ TASE2_CLIENT_ERROR_OBJECT_EXISTS
Definition tase2_common.h:219
@ TASE2_CLIENT_ERROR_INVALID_RETURN_VALUE
Definition tase2_common.h:204
@ TASE2_CLIENT_ERROR_ACCESS_DENIED
Definition tase2_common.h:189
@ TASE2_IND_POINT_TYPE_STATE
Definition tase2_common.h:139
@ TASE2_IND_POINT_TYPE_REAL
Definition tase2_common.h:138
@ TASE2_IND_POINT_TYPE_STATE_SUPPLEMENTAL
Definition tase2_common.h:141
@ TASE2_IND_POINT_TYPE_DISCRETE
Definition tase2_common.h:140
@ TASE2_TAG_OPEN_AND_CLOSE_INHIBIT
Definition tase2_common.h:298
@ TASE2_TAG_CLOSE_ONLY_INHIBIT
Definition tase2_common.h:301
@ TASE2_TAG_NO_TAG
Definition tase2_common.h:295
@ TASE2_TAG_INVALID
Definition tase2_common.h:304
@ TASE2_LOG_SOURCE_ISO_LAYERS
Definition tase2_common.h:64
@ TASE2_LOG_SOURCE_ICCP
Definition tase2_common.h:60
@ TASE2_LOG_SOURCE_TLS
Definition tase2_common.h:63
@ TASE2_LOG_SOURCE_MMS
Definition tase2_common.h:61
@ TASE2_LOG_SOURCE_TCP
Definition tase2_common.h:62
@ TASE2_NO_QUALITY
Definition tase2_common.h:145
@ TASE2_QUALITY
Definition tase2_common.h:146
@ TASE2_VALUE_TYPE_SINGLE_EVENT
Definition tase2_common.h:340
@ TASE2_VALUE_TYPE_STATE_SUPPLEMENTAL
Definition tase2_common.h:325
@ TASE2_VALUE_TYPE_DISCRETE
Definition tase2_common.h:330
@ TASE2_VALUE_TYPE_ERROR
Definition tase2_common.h:350
@ TASE2_VALUE_TYPE_STATE_OR_DISCRETE
Definition tase2_common.h:365
@ TASE2_VALUE_TYPE_STATE_OR_STATE_SUPPLEMENTAL
Definition tase2_common.h:360
@ TASE2_VALUE_TYPE_UNKNOWN
Definition tase2_common.h:355
@ TASE2_VALUE_TYPE_PACKED_EVENT
Definition tase2_common.h:345
@ TASE2_VALUE_TYPE_REAL
Definition tase2_common.h:335
@ TASE2_VALUE_TYPE_STATE
Definition tase2_common.h:320
@ TASE2_LOG_NONE
Definition tase2_common.h:56
@ TASE2_LOG_WARNING
Definition tase2_common.h:46
@ TASE2_LOG_INFO
Definition tase2_common.h:41
@ TASE2_LOG_ERROR
Definition tase2_common.h:51
@ TASE2_LOG_DEBUG
Definition tase2_common.h:36
@ TASE2_REPORT_REASON_OTHER_EXTERNAL_EVENT
Definition tase2_common.h:313
@ TASE2_REPORT_REASON_OBJECT_CHANGE
Definition tase2_common.h:311
@ TASE2_REPORT_REASON_INTERVAL_TIMEOUT
Definition tase2_common.h:309
@ TASE2_REPORT_REASON_OPERATOR_REQUESTED
Definition tase2_common.h:312
@ TASE2_REPORT_REASON_INTEGRITY_TIMEOUT
Definition tase2_common.h:310
@ TASE2_NO_TIMESTAMP
Definition tase2_common.h:153
@ TASE2_TIMESTAMP_EXTENDED
Definition tase2_common.h:163
@ TASE2_TIMESTAMP
Definition tase2_common.h:158
uint8_t Tase2_DataState
Definition tase2_common.h:451
Tase2_PointValueError
Definition tase2_common.h:488
TASE2_API Tase2_PointValueError Tase2_PointValue_setValueStateSupplementalEx(Tase2_PointValue self, Tase2_DataStateSupplemental value)
Set the value of an indication point of type STATE_SUPPLEMENTAL.
TASE2_API Tase2_PointValueError Tase2_PointValue_setPackedEventFlagsEx(Tase2_PointValue self, Tase2_PackedEventFlags flags)
Set the packed event flags.
TASE2_API void Tase2_PointValue_destroy(Tase2_PointValue self)
Release all resource related to the point value instance.
TASE2_API Tase2_PointValue Tase2_PointValue_createSingleProtectionEvent(Tase2_SingleEventFlags eventFlags, int32_t operatingTime, uint64_t eventTime)
Create a new point value instance of type single event (TASE2_VALUE_TYPE_SINGLE_EVENT)
TASE2_API int32_t Tase2_PointValue_getOperatingTime(Tase2_PointValue self)
Get the operation or event duration.
TASE2_API Tase2_PointValue Tase2_PointValue_createStateQ(Tase2_DataState value, Tase2_DataFlags flags)
Create a new PointValue instance of type StateQ.
TASE2_API uint64_t Tase2_PointValue_getTimeStampEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the time stamp of the last data point change or update.
TASE2_API uint16_t Tase2_PointValue_getCOVEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the COV (counter of value changes) of a data point.
TASE2_API Tase2_PackedEventFlags Tase2_PointValue_getPackedEventFlags(Tase2_PointValue self)
Get the packed event flags value.
TASE2_API Tase2_PointValue Tase2_PointValue_createDiscreteQ(int32_t value, Tase2_DataFlags flags)
Create a new point value instance of Type DiscreteQ.
uint8_t Tase2_SingleEventFlags
Definition tase2_common.h:1092
TASE2_API Tase2_PointValue Tase2_PointValue_createStateQTimeTag(Tase2_DataFlags valueAndFlags, int32_t timeTag)
Create a new point value instance of Type StateQTimeTag.
TASE2_API void Tase2_PointValue_setValueStateSupplemental(Tase2_PointValue self, Tase2_DataStateSupplemental value)
Set the value of an indication point of type STATE_SUPPLEMENTAL.
TASE2_API void Tase2_PointValue_setPackedEventFlags(Tase2_PointValue self, Tase2_PackedEventFlags flags)
Set the packed event flags.
TASE2_API Tase2_PointValue Tase2_PointValue_createDiscreteQTimeTagExtended(int32_t value, Tase2_DataFlags flags, uint64_t timeTagExtended)
Create a new point value instance of Type DiscreteQTimeTagExtended.
TASE2_API uint16_t Tase2_PointValue_getCOV(Tase2_PointValue self)
Get the COV (counter of value changes) of a data point.
TASE2_API void Tase2_PointValue_setType(Tase2_PointValue self, Tase2_PointValueType type)
Set the type of a point value.
TASE2_API Tase2_PointValueError Tase2_PointValue_setSingleEventFlagsEx(Tase2_PointValue self, Tase2_SingleEventFlags eventFlags)
Set the single event flags value.
TASE2_API Tase2_PointValue Tase2_PointValue_createRealQTimeTagExtended(float value, Tase2_DataFlags flags, uint64_t timeTagExtended)
Create a new point value instance of Type RealQTimeTagExtended.
TASE2_API Tase2_DataStateSupplemental Tase2_PointValue_getValueStateSupplementalEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the value of an indication point of type STATE_SUPPLEMENTAL.
uint8_t Tase2_DataFlags
Definition tase2_common.h:440
TASE2_API Tase2_PointValueError Tase2_PointValue_setCOVEx(Tase2_PointValue self, uint16_t cov)
Set the COV (counter of value changes) of a data point.
TASE2_API Tase2_SingleEventFlags Tase2_PointValue_getSingleEventFlags(Tase2_PointValue self)
Get the single event flags value.
TASE2_API Tase2_PointValue Tase2_PointValue_createDiscreteQTimeTag(int32_t value, Tase2_DataFlags flags, int32_t timeTag)
Create a new point value instance of Type DiscreteQTimeTag.
TASE2_API void Tase2_PointValue_setPackedEvent(Tase2_PointValue self, Tase2_EventFlags packedEvent)
Set the packed event values.
TASE2_API float Tase2_PointValue_getValueRealEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the real value.
TASE2_API Tase2_PointValue Tase2_PointValue_createRealQ(float value, Tase2_DataFlags flags)
Create a new point value instance of Type RealQ.
TASE2_API void Tase2_PointValue_setEventTime(Tase2_PointValue self, uint64_t eventTime)
Set the event/operation start time.
TASE2_API Tase2_PointValueError Tase2_PointValue_setOperatingTimeEx(Tase2_PointValue self, int32_t operatingTime)
Set the operation or event duration.
TASE2_API float Tase2_PointValue_getValueReal(Tase2_PointValue self)
Get the real value.
TASE2_API Tase2_PointValue Tase2_PointValue_createRealExtended(float value, Tase2_DataFlags flags, int32_t timeTag, uint16_t cov)
Create a new point value instance of Type RealExtended.
struct sTase2_PointValue * Tase2_PointValue
A TASE.2 point value with type information.
Definition tase2_common.h:388
TASE2_API Tase2_PointValue Tase2_PointValue_createStateSupplemental(Tase2_DataStateSupplemental value)
Create a new PointValue instance of type "state-supplemental".
TASE2_API Tase2_TimeStampClass Tase2_PointValue_getTimeStampClass(Tase2_PointValue self)
Get the timestamp class of the value.
TASE2_API Tase2_PointValueError Tase2_PointValue_setTimeStampEx(Tase2_PointValue self, uint64_t timestamp)
Set the time stamp of the last data point change or update.
TASE2_API Tase2_PointValue Tase2_PointValue_getCopy(Tase2_PointValue self)
Create a copy (clone) of the PointValue instances.
TASE2_API uint64_t Tase2_PointValue_getEventTimeEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the event/operation start time.
TASE2_API void Tase2_PointValue_setSingleEventFlags(Tase2_PointValue self, Tase2_SingleEventFlags eventFlags)
Set the single event flags value.
TASE2_API void Tase2_PointValue_setValueState(Tase2_PointValue self, Tase2_DataState value)
Set the value of an indication point of type STATE.
TASE2_API Tase2_PointValue Tase2_PointValue_createDiscrete(int32_t value)
Create a new PointValue instance of type "discrete".
TASE2_API bool Tase2_PointValue_hasTimeStamp(Tase2_PointValue self)
Try to determine if the value has a timestamp.
uint8_t Tase2_EventFlags
Definition tase2_common.h:1103
TASE2_API void Tase2_PointValue_setTimeStamp(Tase2_PointValue self, uint64_t timestamp)
Set the time stamp of the last data point change or update.
TASE2_API void Tase2_PointValue_setValueReal(Tase2_PointValue self, float value)
Set the real value.
TASE2_API Tase2_PointValue Tase2_PointValue_createState(Tase2_DataState value)
Create a new PointValue instance of type "state".
TASE2_API Tase2_PointValue Tase2_PointValue_createStateExtended(Tase2_DataFlags valueAndFlags, int32_t timeTag, uint16_t cov)
Create a new point value instance of Type StateExtended.
TASE2_API Tase2_EventFlags Tase2_PointValue_getPackedEventEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the packed event values.
TASE2_API Tase2_PointValueError Tase2_PointValue_setFlagsEx(Tase2_PointValue self, Tase2_DataFlags flags)
Set the quality flags of a data point.
TASE2_API Tase2_PointValue Tase2_PointValue_createStateSupplementalExtended(Tase2_DataStateSupplemental value, Tase2_DataFlags flags, int32_t timeTag, uint16_t cov)
Create a new PointValue instance of type StateSupplementalExtended.
TASE2_API Tase2_DataState Tase2_PointValue_getValueStateEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the value of an indication point of type STATE.
TASE2_API void Tase2_PointValue_setCOV(Tase2_PointValue self, uint16_t cov)
Set the COV (counter of value changes) of a data point.
TASE2_API int32_t Tase2_PointValue_getValueDiscreteEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the value of an indication point of type DISCRETE.
TASE2_API Tase2_PointValue Tase2_PointValue_createRealQTimeTag(float value, Tase2_DataFlags flags, int32_t timeTag)
Create a new point value instance of Type RealQTimeTag.
TASE2_API Tase2_DataStateSupplemental Tase2_PointValue_getValueStateSupplemental(Tase2_PointValue self)
Get the value of an indication point of type STATE_SUPPLEMENTAL.
TASE2_API Tase2_PointValue Tase2_PointValue_createStateQTimeTagExtended(Tase2_DataFlags valueAndFlags, uint64_t timeTagExtended)
Create a new point value instance of Type StateQTimeTagExtended.
TASE2_API Tase2_DataState Tase2_PointValue_getValueState(Tase2_PointValue self)
Get the value of an indication point of type STATE.
TASE2_API Tase2_PointValue Tase2_PointValue_createReal(float value)
Create a new PointValue instance of type "real".
TASE2_API Tase2_PointValue Tase2_PointValue_createPackedProtectionEvent(Tase2_EventFlags packedEvent, Tase2_PackedEventFlags packedEventFlags, int32_t operatingTime, uint64_t eventTime)
Create a new point value instance of type packed event (TASE2_VALUE_TYPE_PACKED_EVENT)
TASE2_API Tase2_PointValue Tase2_PointValue_createDiscreteExtended(int32_t value, Tase2_DataFlags flags, int32_t timeTag, uint16_t cov)
Create a new point value instance of Type DiscreteExtended.
uint8_t Tase2_PackedEventFlags
Definition tase2_common.h:1112
TASE2_API Tase2_PointValueError Tase2_PointValue_setValueRealEx(Tase2_PointValue self, float value)
Set the real value.
TASE2_API Tase2_PointValue Tase2_PointValue_createStateSupplementalQ(Tase2_DataStateSupplemental value, Tase2_DataFlags flags)
Create a new PointValue instance of type StateSupplementalQ.
TASE2_API Tase2_PointValue Tase2_PointValue_createStateSupplementalQTimeTagExtended(Tase2_DataStateSupplemental value, Tase2_DataFlags flags, uint64_t timeTagExtended)
Create a new PointValue instance of type StateSupplementalQTimeTagExtended.
TASE2_API uint64_t Tase2_PointValue_getTimeStamp(Tase2_PointValue self)
Get the time stamp of the last data point change or update.
TASE2_API uint64_t Tase2_PointValue_getEventTime(Tase2_PointValue self)
Get the event/operation start time.
TASE2_API Tase2_PointValue Tase2_PointValue_createStateSupplementalQTimeTag(Tase2_DataStateSupplemental value, Tase2_DataFlags flags, int32_t timeTag)
Create a new PointValue instance of type StateSupplementalQTimeTag.
TASE2_API Tase2_DataFlags Tase2_PointValue_getFlags(Tase2_PointValue self)
Get the quality flags of a data point.
TASE2_API Tase2_PointValueType Tase2_PointValue_getType(Tase2_PointValue self)
Get the (estimated) type of the point value.
Tase2_PointValueError Tase2_PointValue_setPackedEventEx(Tase2_PointValue self, Tase2_EventFlags packedEvent)
Set the packed event values.
TASE2_API Tase2_PackedEventFlags Tase2_PointValue_getPackedEventFlagsEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the packed event flags value.
TASE2_API Tase2_SingleEventFlags Tase2_PointValue_getSingleEventFlagsEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the single event flags value.
TASE2_API Tase2_DataFlags Tase2_PointValue_getFlagsEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the quality flags of a data point.
TASE2_API Tase2_PointValueError Tase2_PointValue_setEventTimeEx(Tase2_PointValue self, uint64_t eventTime)
Set the event/operation start time.
uint8_t Tase2_DataStateSupplemental
Definition tase2_common.h:479
TASE2_API int32_t Tase2_PointValue_getValueDiscrete(Tase2_PointValue self)
Get the value of an indication point of type DISCRETE.
TASE2_API Tase2_PointValueError Tase2_PointValue_setValueStateEx(Tase2_PointValue self, Tase2_DataState value)
Set the value of an indication point of type STATE.
TASE2_API void Tase2_PointValue_setOperatingTime(Tase2_PointValue self, int32_t operatingTime)
Set the operation or event duration.
TASE2_API Tase2_EventFlags Tase2_PointValue_getPackedEvent(Tase2_PointValue self)
Get the packed event flags values.
TASE2_API int32_t Tase2_PointValue_getOperatingTimeEx(Tase2_PointValue self, Tase2_PointValueError *err)
Get the operation or event duration.
TASE2_API void Tase2_PointValue_setValueDiscrete(Tase2_PointValue self, int32_t value)
Set the value of an indication point of type DISCRETE.
TASE2_API Tase2_ClientError Tase2_PointValue_getError(Tase2_PointValue self)
Get the error code (when point value type is TASE2_VALUE_TYPE_ERROR)
TASE2_API Tase2_PointValueError Tase2_PointValue_setValueDiscreteEx(Tase2_PointValue self, int32_t value)
Set the value of an indication point of type DISCRETE.
TASE2_API void Tase2_PointValue_setFlags(Tase2_PointValue self, Tase2_DataFlags flags)
Set the quality flags of a data point.
@ TASE2_POINT_VALUE_ERROR_OK
Definition tase2_common.h:489
@ TASE2_POINT_VALUE_ERROR_WRONG_TYPE
Definition tase2_common.h:490
Some stack statistics.
Definition tase2_common.h:131
uint64_t messagesRcvd
Definition tase2_common.h:133
uint64_t messagesSent
Definition tase2_common.h:132
uint64_t errors
Definition tase2_common.h:134
Definition tase2_common.h:371
char domainName[33]
Definition tase2_common.h:372
char pointName[33]
Definition tase2_common.h:373