libtase2
2.4.0
TASE.2/ICCP Protocol Source Code Library for C/C++
|
Data Structures | |
struct | Tase2_OperateValue |
Value for the operate action (supports the different types for command and set points) More... | |
Topics | |
Functions for bilateral table (BLT) management | |
Typedefs | |
typedef struct sTase2_SentPointValue * | Tase2_SentPointValue |
typedef void(* | Tase2_ClientConnectionHandler) (void *parameter, const char *clientAddress, Tase2_BilateralTable clientBlt, bool connect) |
Callback handler for accepted client connections. | |
typedef Tase2_HandlerResult(* | Tase2_SelectHandler) (void *parameter, Tase2_ControlPoint controlPoint) |
Callback handler for the select operation. | |
typedef Tase2_HandlerResult(* | Tase2_OperateHandler) (void *parameter, Tase2_ControlPoint controlPoint, Tase2_OperateValue value) |
Callback handler for the operate operation. | |
typedef Tase2_HandlerResult(* | Tase2_OperateHandlerEx) (void *parameter, Tase2_ControlPoint controlPoint, int16_t cmdDiscreteValue, float realValue) |
typedef Tase2_HandlerResult(* | Tase2_SetTagHandler) (void *parameter, Tase2_ControlPoint controlPoint, Tase2_TagValue value, const char *reason) |
Callback handler for the set tag operation. | |
typedef Tase2_HandlerResult(* | Tase2_WriteDataHandler) (void *parameter, Tase2_Domain domain, Tase2_DataPoint dataPoint, Tase2_PointValue value) |
Callback handler for write operations to indication points (and protection event data points) | |
typedef void(* | Tase2_TSCriticalNotConfirmedHandler) (void *parameter, Tase2_TransferSet transferSet, uint64_t timeSent, bool nack) |
Callback handler for critical report timeout or negative acknowledge. | |
typedef void(* | Tase2_DSTransferSetStateChangedHandler) (void *parameter, Tase2_DSTransferSet transferSet, bool enabled) |
Callback handler for DSTS state changes (enabled/disabled) | |
typedef void(* | Tase2_DSTransferSetUpdateHandler) (void *parameter, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, Tase2_DSTransferSet transferSet, bool isEnabled) |
Callback handler for DSTS updates (enabled/disabled) | |
typedef void(* | Tase2_DataSetEventHandler) (void *parameter, bool create, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, Tase2_Domain dataSetDomain, char *dataSetName, LinkedList dataPoints) |
Callback handler that is called when a data set is created or deleted. | |
typedef void(* | Tase2_IMTransferSetEventHandler) (void *parameter, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, bool enabled) |
Callback handler for IM transfer set events (enabled/disabled) | |
typedef void(* | Tase2_DSTransferSetReportSentHandler) (void *parameter, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, Tase2_DSTransferSet transferSet, LinkedList sentDataPoints, Tase2_ReportReason reason) |
Callback handler for sent DSTS reports. | |
Enumerations | |
enum | Tase2_HandlerResult { TASE2_RESULT_SUCCESS = -1 , TASE2_RESULT_HARDWARE_FAULT = 1 , TASE2_RESULT_TEMPORARILY_UNAVAILABLE = 2 , TASE2_RESULT_OBJECT_ACCESS_DENIED = 3 , TASE2_RESULT_OBJECT_VALUE_INVALID = 11 } |
Type for the result of callback handlers for operations. More... | |
Functions | |
TASE2_API Tase2_DataPoint | Tase2_SentPointValue_getDataPoint (Tase2_SentPointValue self) |
TASE2_API Tase2_PointValue | Tase2_SentPointValue_getPointValue (Tase2_SentPointValue self) |
TASE2_API Tase2_Server | Tase2_Server_create (Tase2_DataModel dataModel, TLSConfiguration tlsConfiguration) |
Create a new TASE.2 server instance. | |
TASE2_API Tase2_Server | Tase2_Server_createEx (Tase2_DataModel dataModel, Tase2_Endpoint endpoint) |
Create a new TASE.2 server instance using an existing endpoint instance. | |
TASE2_API Tase2_Endpoint | Tase2_Server_getEndpoint (Tase2_Server self) |
Get the endpoint instance used by the server. | |
TASE2_API void | Tase2_Server_setLocalIpAddress (Tase2_Server self, const char *localIpAddress) |
Set the local IP address. | |
TASE2_API void | Tase2_Server_setTcpPort (Tase2_Server self, int tcpPort) |
Set the local TCP port. | |
TASE2_API void | Tase2_Server_setLocalApTitle (Tase2_Server self, const char *apTitle, int aeQualifier) |
Set application endpoint identifier of the local endpoint. | |
TASE2_API void | Tase2_Server_setLocalAddresses (Tase2_Server self, Tase2_PSelector pSelector, Tase2_SSelector sSelector, Tase2_TSelector tSelector) |
set local addresses for the lower layers | |
TASE2_API IsoApplicationAddress | Tase2_Server_getLocalAddresses (Tase2_Server self) |
TASE2_API void | Tase2_Server_setSelectTimeout (Tase2_Server self, int timeoutInMs) |
Set the timeout for select operations (device model) | |
TASE2_API void | Tase2_Server_setCriticalReportTimeout (Tase2_Server self, int timeoutInMs) |
Set the timeout for critical report confirmations. | |
TASE2_API void | Tase2_Server_setMaxDSTSEventQueueSize (Tase2_Server self, int maxSize) |
Set the maximum event queue size for DS transfer sets. | |
TASE2_API void | Tase2_Server_addBilateralTable (Tase2_Server self, Tase2_BilateralTable blt) |
Load bilateral table (BLT) into the server (part of the server configuration phase) | |
TASE2_API void | Tase2_Server_setIdentity (Tase2_Server self, char *vendor, char *model, char *revision) |
Set own identity for the identity service. | |
TASE2_API void | Tase2_Server_setSupportedFeatures (Tase2_Server self, int value) |
Change the default value of the "Supported_Features" variable. | |
TASE2_API void | Tase2_Server_setClientConnectionHandler (Tase2_Server self, Tase2_ClientConnectionHandler handler, void *parameter) |
Set the client connection handler that is called when a client connects or disconnects. | |
TASE2_API void | Tase2_Server_setSelectHandler (Tase2_Server self, Tase2_SelectHandler handler, void *parameter) |
Set the select operation callback handler and parameter. | |
TASE2_API void | Tase2_Server_setOperateHandler (Tase2_Server self, Tase2_OperateHandler handler, void *parameter) |
Set the operate operation callback handler and parameter. | |
TASE2_API void | Tase2_Server_setOperateHandlerEx (Tase2_Server self, Tase2_OperateHandlerEx handler, void *parameter) |
Set the alternative operate handler (used to simplify programming language bindings) | |
TASE2_API void | Tase2_Server_setSetTagHandler (Tase2_Server self, Tase2_SetTagHandler handler, void *parameter) |
Set the set tag operation callback handler and parameter. | |
TASE2_API void | Tase2_Server_setWriteDataHandler (Tase2_Server self, Tase2_WriteDataHandler handler, void *parameter) |
Set the Tase2_WriteDataHandler callback handler that is called when a data point is written. | |
TASE2_API void | Tase2_Server_setTSCriticalNotConfirmedHandler (Tase2_Server self, Tase2_TSCriticalNotConfirmedHandler handler, void *parameter) |
Install a callback handler that is called when a transfer set report (marked as critical) is not confirmed by the client or confirmed negative. | |
TASE2_API void | Tase2_Server_setDSTransferSetStateChangedHandler (Tase2_Server self, Tase2_DSTransferSetStateChangedHandler handler, void *parameter) |
Install a callback handler that is called whenever the state of a DS transfer set changes. | |
TASE2_API void | Tase2_Server_setDataSetEventHandler (Tase2_Server self, Tase2_DataSetEventHandler handler, void *parameter) |
Install a callback handler that is called whenever a dynamic data set is created or deleted by a client. | |
TASE2_API void | Tase2_Server_setDSTransferSetUpdateHandler (Tase2_Server self, Tase2_DSTransferSetUpdateHandler handler, void *parameter) |
Install a callback handler that is called whenever the DS transfer set is updated (enabled/disabled) | |
TASE2_API void | Tase2_Server_setIMTransferSetEventHandler (Tase2_Server self, Tase2_IMTransferSetEventHandler handler, void *parameter) |
Install a callback handler that is called whenever the IM Transfer set is enabled or disabled. | |
TASE2_API void | Tase2_Server_setDSTransferSetReportSentHandler (Tase2_Server self, Tase2_DSTransferSetReportSentHandler handler, void *parameter) |
Install a callback handler that is called whenever a transfer set report is sent. | |
TASE2_API bool | Tase2_Server_requestReport (Tase2_Server self, Tase2_DSTransferSet transferSet, Tase2_ReportReason reason, int16_t eventCode) |
Manually trigger a DSTS report transmission of the given transfer set. | |
TASE2_API int | Tase2_Server_sendInformationMessage (Tase2_Server self, Tase2_Domain domain, int32_t infoRef, int32_t localRef, int32_t msgId, int32_t size, uint8_t *buffer) |
Send information message to all clients that have the IM transfer set enabled and BLT matches the information object. | |
TASE2_API void | Tase2_Server_start (Tase2_Server self) |
Starts the server (will start a background thread handling incoming connections) | |
TASE2_API void | Tase2_Server_stop (Tase2_Server self) |
Stops the server. | |
TASE2_API Tase2_Statistics | Tase2_Server_getStatistics (Tase2_Server self) |
Get some communication statistics. | |
TASE2_API bool | Tase2_Server_isRunning (Tase2_Server self) |
Checks if the server is running. | |
TASE2_API void | Tase2_Server_updateOnlineValue (Tase2_Server self, Tase2_DataPoint dataPoint) |
Update the online available value with the local value of the data point. | |
TASE2_API void | Tase2_Server_updateByOnlineValue (Tase2_Server self, Tase2_DataPoint dataPoint) |
Update the local value by the online available value of the data point. | |
TASE2_API void | Tase2_Server_updateOnlineValueNoTrigger (Tase2_Server self, Tase2_DataPoint dataPoint) |
Update the online available value with the local value of the data point (don't trigger transfer sets) | |
TASE2_API void | Tase2_Server_destroy (Tase2_Server self) |
Destroy the server instance (release all allocated resources) | |
typedef void(* Tase2_ClientConnectionHandler) (void *parameter, const char *clientAddress, Tase2_BilateralTable clientBlt, bool connect) |
Callback handler for accepted client connections.
This callback is called when a new connection is accepted or an already accepted connection is closed.
parameter | user provided parameter |
clientAddress | client IP address and port number (only valid in the context of the callback function) |
clientBlt | the BLT associated with the client |
connect | If true, client is connecting, otherwise disconnecting |
typedef void(* Tase2_DataSetEventHandler) (void *parameter, bool create, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, Tase2_Domain dataSetDomain, char *dataSetName, LinkedList dataPoints) |
Callback handler that is called when a data set is created or deleted.
parameter | user provided context parameter |
create | when true, the data set is created, when false it is deleted |
peer | the client that caused the update |
clientBlt | the BLT associated with the client |
dataSetDomain | the domain of the data set |
dataSetName | the name of the created or deleted data set |
dataPoints | the data points of the created or deleted data set (list elements are of type Tase2_DataPoint) |
typedef void(* Tase2_DSTransferSetReportSentHandler) (void *parameter, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, Tase2_DSTransferSet transferSet, LinkedList sentDataPoints, Tase2_ReportReason reason) |
Callback handler for sent DSTS reports.
parameter | user provided context parameter |
peer | the client that caused the update |
clientBlt | the BLT associated with the client |
transferSet | the transfer set that sending the report |
sentDataPoints | list of sent data points (list elements of type Tase2_SentPointValue) |
reason | reason of the transfer set report |
typedef void(* Tase2_DSTransferSetStateChangedHandler) (void *parameter, Tase2_DSTransferSet transferSet, bool enabled) |
Callback handler for DSTS state changes (enabled/disabled)
parameter | user provided context parameter |
transferSet | the transfer set that changed its state |
enabled | true when the new state is enabled, false otherwise |
typedef void(* Tase2_DSTransferSetUpdateHandler) (void *parameter, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, Tase2_DSTransferSet transferSet, bool isEnabled) |
Callback handler for DSTS updates (enabled/disabled)
parameter | user provided context parameter |
peer | the client that caused the update |
clientBlt | the BLT associated with the client |
transferSet | the transfer set that is updated |
isEnabled | true when the state is enabled, false otherwise |
typedef void(* Tase2_IMTransferSetEventHandler) (void *parameter, Tase2_Endpoint_Connection peer, Tase2_BilateralTable clientBlt, bool enabled) |
Callback handler for IM transfer set events (enabled/disabled)
parameter | user provided context parameter |
peer | the client that caused the update |
clientBlt | the BLT associated with the client |
isEnabled | true when the state is enabled, false otherwise |
typedef Tase2_HandlerResult(* Tase2_OperateHandler) (void *parameter, Tase2_ControlPoint controlPoint, Tase2_OperateValue value) |
Callback handler for the operate operation.
parameter | user provided parameter |
controlPoint | target control point (device) of the operate request |
value | the command/set point value |
typedef Tase2_HandlerResult(* Tase2_OperateHandlerEx) (void *parameter, Tase2_ControlPoint controlPoint, int16_t cmdDiscreteValue, float realValue) |
typedef Tase2_HandlerResult(* Tase2_SelectHandler) (void *parameter, Tase2_ControlPoint controlPoint) |
Callback handler for the select operation.
parameter | user provided parameter |
controlPoint | target control point (device) of the select operation |
typedef struct sTase2_SentPointValue* Tase2_SentPointValue |
typedef Tase2_HandlerResult(* Tase2_SetTagHandler) (void *parameter, Tase2_ControlPoint controlPoint, Tase2_TagValue value, const char *reason) |
Callback handler for the set tag operation.
parameter | user provided parameter |
controlPoint | target control point (device) of the set tag request |
value | the tag value |
reason | a text message from the client to indicate the reason of the tag |
typedef void(* Tase2_TSCriticalNotConfirmedHandler) (void *parameter, Tase2_TransferSet transferSet, uint64_t timeSent, bool nack) |
Callback handler for critical report timeout or negative acknowledge.
parameter | used provided context parameter |
transferSet | the transfer set that caused the report |
timeSent | time when the report has been sent (milliseconds since UTC epoch) |
nack | true if a NACK message caused the callback, false if the callback was caused by a timeout |
typedef Tase2_HandlerResult(* Tase2_WriteDataHandler) (void *parameter, Tase2_Domain domain, Tase2_DataPoint dataPoint, Tase2_PointValue value) |
Callback handler for write operations to indication points (and protection event data points)
parameter | user provided context parameter |
domain | domain of the data point to be written |
dataPoint | data point to be written |
value | the new value of the data point |
enum Tase2_HandlerResult |
Type for the result of callback handlers for operations.
TASE2_API Tase2_DataPoint Tase2_SentPointValue_getDataPoint | ( | Tase2_SentPointValue | self | ) |
TASE2_API Tase2_PointValue Tase2_SentPointValue_getPointValue | ( | Tase2_SentPointValue | self | ) |
TASE2_API void Tase2_Server_addBilateralTable | ( | Tase2_Server | self, |
Tase2_BilateralTable | blt ) |
Load bilateral table (BLT) into the server (part of the server configuration phase)
self | Tase2_Server instance |
blt | a BLT instance |
TASE2_API Tase2_Server Tase2_Server_create | ( | Tase2_DataModel | dataModel, |
TLSConfiguration | tlsConfiguration ) |
Create a new TASE.2 server instance.
NOTE: This function creates a new passive endpoint (see Tase2_Endpoint) instance (TCP server).
dataModel | the data model to use |
tlsConfiguration | the TLS configuration object or NULL when no TLS is used. |
TASE2_API Tase2_Server Tase2_Server_createEx | ( | Tase2_DataModel | dataModel, |
Tase2_Endpoint | endpoint ) |
Create a new TASE.2 server instance using an existing endpoint instance.
dataModel | the data model to use |
endpoint | the endpoint instance to use |
TASE2_API void Tase2_Server_destroy | ( | Tase2_Server | self | ) |
Destroy the server instance (release all allocated resources)
Should be called when the server is no longer needed. NOTE: The server instance can no longer be used after calling this function.
self | Tase2_Server instance |
TASE2_API Tase2_Endpoint Tase2_Server_getEndpoint | ( | Tase2_Server | self | ) |
Get the endpoint instance used by the server.
TASE2_API IsoApplicationAddress Tase2_Server_getLocalAddresses | ( | Tase2_Server | self | ) |
TASE2_API Tase2_Statistics Tase2_Server_getStatistics | ( | Tase2_Server | self | ) |
Get some communication statistics.
self | Tase2_Server instance |
TASE2_API bool Tase2_Server_isRunning | ( | Tase2_Server | self | ) |
Checks if the server is running.
Can be used to check if the server is listening for incoming connections (passive mode) or is connected (active and passive mode)
self | Tase2_Server instance |
TASE2_API bool Tase2_Server_requestReport | ( | Tase2_Server | self, |
Tase2_DSTransferSet | transferSet, | ||
Tase2_ReportReason | reason, | ||
int16_t | eventCode ) |
Manually trigger a DSTS report transmission of the given transfer set.
This function can be used to trigger data set transfer set reports with the reasons "operator-requested" and "other-external-event". The reports will only be sent when the transfer set it enabled.
DO NOT CALL THIS FUNCTION INSIDE A LIBRARY CALLBACK! Calling this function inside library callbacks can cause deadlock situations.
self | Tase2_Server instance |
transferSet | the transfer set to report/transmit |
reason | the reason for the report (should be TASE2_REPORT_REASON_OPERATOR_REQUESTED or TASE2_REPORT_REASON_OTHER_EXTERNAL_EVENT) |
eventCode | the event code in case the reason is TASE2_REPORT_REASON_OTHER_EXTERNAL_EVENT |
TASE2_API int Tase2_Server_sendInformationMessage | ( | Tase2_Server | self, |
Tase2_Domain | domain, | ||
int32_t | infoRef, | ||
int32_t | localRef, | ||
int32_t | msgId, | ||
int32_t | size, | ||
uint8_t * | buffer ) |
Send information message to all clients that have the IM transfer set enabled and BLT matches the information object.
NOTE: when no BLT is defined the messages will be sent to all clients.
DO NOT CALL THIS FUNCTION INSIDE A LIBRARY CALLBACK! Calling this function inside library callbacks can cause deadlock situations.
self | Tase2_Server instance |
domain | use domain to send information object, NULL for VCC scope information message |
TASE2_API void Tase2_Server_setClientConnectionHandler | ( | Tase2_Server | self, |
Tase2_ClientConnectionHandler | handler, | ||
void * | parameter ) |
Set the client connection handler that is called when a client connects or disconnects.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setCriticalReportTimeout | ( | Tase2_Server | self, |
int | timeoutInMs ) |
Set the timeout for critical report confirmations.
self | Tase2_Server instance |
timeoutInMs | timeout in milliseconds |
TASE2_API void Tase2_Server_setDataSetEventHandler | ( | Tase2_Server | self, |
Tase2_DataSetEventHandler | handler, | ||
void * | parameter ) |
Install a callback handler that is called whenever a dynamic data set is created or deleted by a client.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setDSTransferSetReportSentHandler | ( | Tase2_Server | self, |
Tase2_DSTransferSetReportSentHandler | handler, | ||
void * | parameter ) |
Install a callback handler that is called whenever a transfer set report is sent.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setDSTransferSetStateChangedHandler | ( | Tase2_Server | self, |
Tase2_DSTransferSetStateChangedHandler | handler, | ||
void * | parameter ) |
Install a callback handler that is called whenever the state of a DS transfer set changes.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setDSTransferSetUpdateHandler | ( | Tase2_Server | self, |
Tase2_DSTransferSetUpdateHandler | handler, | ||
void * | parameter ) |
Install a callback handler that is called whenever the DS transfer set is updated (enabled/disabled)
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setIdentity | ( | Tase2_Server | self, |
char * | vendor, | ||
char * | model, | ||
char * | revision ) |
Set own identity for the identity service.
self | Tase2_Server instance |
vendor | device/software vendor name |
model | device/software model name |
revision | device/software revision name |
TASE2_API void Tase2_Server_setIMTransferSetEventHandler | ( | Tase2_Server | self, |
Tase2_IMTransferSetEventHandler | handler, | ||
void * | parameter ) |
Install a callback handler that is called whenever the IM Transfer set is enabled or disabled.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setLocalAddresses | ( | Tase2_Server | self, |
Tase2_PSelector | pSelector, | ||
Tase2_SSelector | sSelector, | ||
Tase2_TSelector | tSelector ) |
set local addresses for the lower layers
This function can be used to set the addresses for the lower layer protocols (presentation, session, and transport layer). Calling this function is optional. It might be required when the peer expects specific values for the parameters.
pSelector | the P-Selector (presentation layer address) |
sSelector | the S-Selector (session layer address) |
tSelector | the T-Selector (ISO transport layer address) |
TASE2_API void Tase2_Server_setLocalApTitle | ( | Tase2_Server | self, |
const char * | apTitle, | ||
int | aeQualifier ) |
Set application endpoint identifier of the local endpoint.
NOTE: It is important to set this parameter correctly to match the remotely configured parameter.
apTitle | AP-title part of the local application endpoint identifier |
aeQualifier | AE-qualifier part of the local application endpoint identifier |
TASE2_API void Tase2_Server_setLocalIpAddress | ( | Tase2_Server | self, |
const char * | localIpAddress ) |
Set the local IP address.
NOTE: Calls Tase2_Endpoint_setLocalIpAddress
self | the Tase2_Server instance |
localIpAddress | the local IP address as C string (an internal copy will be created) |
TASE2_API void Tase2_Server_setMaxDSTSEventQueueSize | ( | Tase2_Server | self, |
int | maxSize ) |
Set the maximum event queue size for DS transfer sets.
Use this function to limit the memory required to buffer events.
self | Tase2_Server instance |
maxSize | a positive number to limit the event queue size or -1 (unlimited size) |
TASE2_API void Tase2_Server_setOperateHandler | ( | Tase2_Server | self, |
Tase2_OperateHandler | handler, | ||
void * | parameter ) |
Set the operate operation callback handler and parameter.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setOperateHandlerEx | ( | Tase2_Server | self, |
Tase2_OperateHandlerEx | handler, | ||
void * | parameter ) |
Set the alternative operate handler (used to simplify programming language bindings)
TASE2_API void Tase2_Server_setSelectHandler | ( | Tase2_Server | self, |
Tase2_SelectHandler | handler, | ||
void * | parameter ) |
Set the select operation callback handler and parameter.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setSelectTimeout | ( | Tase2_Server | self, |
int | timeoutInMs ) |
Set the timeout for select operations (device model)
self | Tase2_Server instance |
timeoutInMs | select timeout in milliseconds |
TASE2_API void Tase2_Server_setSetTagHandler | ( | Tase2_Server | self, |
Tase2_SetTagHandler | handler, | ||
void * | parameter ) |
Set the set tag operation callback handler and parameter.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setSupportedFeatures | ( | Tase2_Server | self, |
int | value ) |
Change the default value of the "Supported_Features" variable.
NOTE: Default is conformance blocks 1, 2, 4, and 5
self | Tase2_Server instance |
value | addition of Supported conformance blocks (for "Supported_Features") |
TASE2_API void Tase2_Server_setTcpPort | ( | Tase2_Server | self, |
int | tcpPort ) |
Set the local TCP port.
NOTE: Calls Tase2_Endpoint_setLocalTcpPort
self | Tase2_Server instance |
tcpPort | TCP port number or -1 to use the default TCP port numbers 102 (MMS) or 3782 (MMS/TLS) |
TASE2_API void Tase2_Server_setTSCriticalNotConfirmedHandler | ( | Tase2_Server | self, |
Tase2_TSCriticalNotConfirmedHandler | handler, | ||
void * | parameter ) |
Install a callback handler that is called when a transfer set report (marked as critical) is not confirmed by the client or confirmed negative.
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_setWriteDataHandler | ( | Tase2_Server | self, |
Tase2_WriteDataHandler | handler, | ||
void * | parameter ) |
Set the Tase2_WriteDataHandler callback handler that is called when a data point is written.
A data point can be either a Tase2_IndicationPoint or a Tase2_ProtectionEquipment instance
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
TASE2_API void Tase2_Server_start | ( | Tase2_Server | self | ) |
Starts the server (will start a background thread handling incoming connections)
NOTE: This function calls Tase2_Endpoint_connect
self | Tase2_Server instance |
TASE2_API void Tase2_Server_stop | ( | Tase2_Server | self | ) |
Stops the server.
NOTE: This function calls Tase2_Endpoint_disconnect
self | Tase2_Server instance |
TASE2_API void Tase2_Server_updateByOnlineValue | ( | Tase2_Server | self, |
Tase2_DataPoint | dataPoint ) |
Update the local value by the online available value of the data point.
DO NOT CALL THIS FUNCTION INSIDE A LIBRARY CALLBACK! Calling this function inside library callbacks can cause deadlock situations.
self | Tase2_Server instance |
dataPoint | the data point instance to update |
TASE2_API void Tase2_Server_updateOnlineValue | ( | Tase2_Server | self, |
Tase2_DataPoint | dataPoint ) |
Update the online available value with the local value of the data point.
NOTE: This function may trigger server actions (like sending DS transfer set reports)
DO NOT CALL THIS FUNCTION INSIDE A LIBRARY CALLBACK! Calling this function inside library callbacks can cause deadlock situations.
self | Tase2_Server instance |
dataPoint | the data point instance to update |
TASE2_API void Tase2_Server_updateOnlineValueNoTrigger | ( | Tase2_Server | self, |
Tase2_DataPoint | dataPoint ) |
Update the online available value with the local value of the data point (don't trigger transfer sets)
This function can be used to implement application specific limit or deadband handling for analogue indication points. Call this function when analogue value change doesn't violate a limit or deadband condition. In the case the new analogue value violates such a condition, then call Tase2_Server_updateOnlineValue instead.
DO NOT CALL THIS FUNCTION INSIDE A LIBRARY CALLBACK! Calling this function inside library callbacks can cause deadlock situations.
self | Tase2_Server instance |
dataPoint | the data point instance to update |