libtase2
2.4.0
TASE.2/ICCP Protocol Source Code Library for C/C++
|
#include "tase2_common.h"
#include "tase2_model.h"
#include "tase2_endpoint.h"
#include "tls_config.h"
Go to the source code of this file.
Data Structures | |
struct | Tase2_OperateValue |
Value for the operate action (supports the different types for command and set points) More... | |
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) | |
TASE2_API Tase2_BilateralTable | Tase2_BilateralTable_create (const char *bltId, Tase2_Domain domain, const char *apTitle, int aeQualifier) |
Create a new bilateral table (Tase2_BilateralTable) instance. | |
TASE2_API void | Tase2_BilateralTable_setIsoParameters (Tase2_BilateralTable self, Tase2_PSelector pSelector, Tase2_SSelector sSelector, Tase2_TSelector tSelector) |
Set the ISO protocol layer addresses to associate the endpoint to this BLT. | |
TASE2_API void | Tase2_BilateralTable_addDataPoint (Tase2_BilateralTable self, Tase2_DataPoint dataPoint, bool allowRead, bool allowWrite) |
Add an indication point or protection equipment object to the BLT. | |
TASE2_API void | Tase2_BilateralTable_addControlPoint (Tase2_BilateralTable self, Tase2_ControlPoint controlPoint, int16_t checkBackId, bool allowSetTag, bool allowGetTag, bool allowOperate, bool allowRead) |
Add a control point object to the BLT. | |
TASE2_API void | Tase2_BilateralTable_addInformationMessage (Tase2_BilateralTable self, int32_t infoRef, int32_t localRef, bool vccScope) |
Add an information message object to the BLT. | |
TASE2_API bool | Tase2_BilateralTable_addPeerCertificat (Tase2_BilateralTable self, Crypto_X509Certificate cert) |
Associate a peer X509 certificate with the BLT. | |
TASE2_API const char * | Tase2_BilateralTable_getID (Tase2_BilateralTable self) |
Get the BLT ID. | |