libtase2  2.4.0
TASE.2/ICCP Protocol Source Code Library for C/C++
Loading...
Searching...
No Matches
Common API parts

Data Structures

struct  Tase2_Statistics
 Some stack statistics. More...
 
struct  Tase2_PointName
 
struct  Tase2_TSelector
 T selector (ISO transport layer address) More...
 
struct  Tase2_SSelector
 S selector (ISO session layer address) More...
 
struct  Tase2_PSelector
 P selector (ISO presentation layer address) More...
 
struct  Tase2_ApplicationAddress
 

Topics

 Point value type
 
 Command values (device model)
 
 Supported conformance blocks (for "Supported_Features")
 
 DS conditions (DS transfer sets)
 

Typedefs

typedef void(* Tase2_Log_Function) (int logLevel, const char *message)
 User provided log message handler (optional)
 
typedef void(* Tase2_Log_FunctionEx) (Tase2_LogLevel logLevel, Tase2_LogSource source, Tase2_Endpoint endpoint, Tase2_Endpoint_Connection peer, const char *message)
 
typedef struct sTase2_BilateralTable * Tase2_BilateralTable
 
typedef struct sTase2_Endpoint * Tase2_Endpoint
 A TASE.2 endpoint that can be configured as passive (TCP server) or active (TCP client)
 
typedef struct sTase2_Endpoint_Connection * Tase2_Endpoint_Connection
 Represents a connection to another connected TASE.2 endpoint.
 
typedef struct sTase2_Client * Tase2_Client
 A TASE.2 client to communicate with a single TASE.2 server.
 
typedef struct sTase2_Server * Tase2_Server
 Handle for a Tase2_Server instance (representing a TASE.2/MMS server)
 
typedef void(* Tase2_Endpoint_StateChangedHandler) (Tase2_Endpoint endpoint, void *parameter, Tase2_Endpoint_State newState)
 Callback function is called whenever the state of the endpoint changes.
 
typedef void(* Tase2_Endpoint_ConnectionHandler) (Tase2_Endpoint endpoint, void *parameter, Tase2_Endpoint_Connection connection, bool connect)
 Callback function is called when another endpoint is connected or diconnected to the local endpoint.
 
typedef bool(* Tase2_Endpoint_ConnectionAcceptHandler) (Tase2_Endpoint endpoint, void *parameter, const char *peerAddress, Tase2_BilateralTable clientBlt, Tase2_AuthenticationMethod authType, uint8_t *authValue, int authValLen)
 Callback handler to accept/reject new connections.
 
typedef ASecurityConfiguration(* Tase2_Endpoint_ALSConfigurationProvider) (Tase2_Endpoint endpoint, void *parameter, const char *peerAddress, Tase2_ApplicationAddress localApAddr, Tase2_ApplicationAddress remoteApAddr)
 Callback handler to provide a connection specific ASecurityConfiguration instance for ALS setup.
 

Enumerations

enum  Tase2_LogLevel {
  TASE2_LOG_DEBUG = 1 , TASE2_LOG_INFO = 2 , TASE2_LOG_WARNING = 3 , TASE2_LOG_ERROR = 4 ,
  TASE2_LOG_NONE = 5
}
 Specify the log level for the library internal logging. More...
 
enum  Tase2_LogSource {
  TASE2_LOG_SOURCE_ICCP = 1 , TASE2_LOG_SOURCE_MMS = 2 , TASE2_LOG_SOURCE_TCP = 3 , TASE2_LOG_SOURCE_TLS = 4 ,
  TASE2_LOG_SOURCE_ISO_LAYERS = 5
}
 
enum  Tase2_IndicationPointType { TASE2_IND_POINT_TYPE_REAL = 0 , TASE2_IND_POINT_TYPE_STATE , TASE2_IND_POINT_TYPE_DISCRETE , TASE2_IND_POINT_TYPE_STATE_SUPPLEMENTAL }
 
enum  Tase2_QualityClass { TASE2_NO_QUALITY = 0 , TASE2_QUALITY }
 
enum  Tase2_TimeStampClass { TASE2_NO_TIMESTAMP = 0 , TASE2_TIMESTAMP , TASE2_TIMESTAMP_EXTENDED }
 
enum  Tase2_ClientError {
  TASE2_CLIENT_ERROR_OK = 0 , TASE2_CLIENT_ERROR_FAILED , TASE2_CLIENT_ERROR_TIMEOUT , TASE2_CLIENT_ERROR_ACCESS_DENIED ,
  TASE2_CLIENT_ERROR_TEMPORARILY_UNAVAILABLE , TASE2_CLIENT_ERROR_INVALID_ARGUMENT , TASE2_CLIENT_ERROR_INVALID_RETURN_VALUE , TASE2_CLIENT_ERROR_OTHER ,
  TASE2_CLIENT_ERROR_OBJECT_NOT_EXISTING , TASE2_CLIENT_ERROR_OBJECT_EXISTS
}
 Client side error code. More...
 
enum  Tase2_TagValue { TASE2_TAG_NO_TAG = 0 , TASE2_TAG_OPEN_AND_CLOSE_INHIBIT = 1 , TASE2_TAG_CLOSE_ONLY_INHIBIT = 2 , TASE2_TAG_INVALID = 3 }
 
enum  Tase2_ReportReason {
  TASE2_REPORT_REASON_INTERVAL_TIMEOUT = 1 , TASE2_REPORT_REASON_INTEGRITY_TIMEOUT = 2 , TASE2_REPORT_REASON_OBJECT_CHANGE = 4 , TASE2_REPORT_REASON_OPERATOR_REQUESTED = 8 ,
  TASE2_REPORT_REASON_OTHER_EXTERNAL_EVENT = 16
}
 
enum  Tase2_PointValueType {
  TASE2_VALUE_TYPE_STATE = 0 , TASE2_VALUE_TYPE_STATE_SUPPLEMENTAL , TASE2_VALUE_TYPE_DISCRETE , TASE2_VALUE_TYPE_REAL ,
  TASE2_VALUE_TYPE_SINGLE_EVENT , TASE2_VALUE_TYPE_PACKED_EVENT , TASE2_VALUE_TYPE_ERROR = 99 , TASE2_VALUE_TYPE_UNKNOWN = 100 ,
  TASE2_VALUE_TYPE_STATE_OR_STATE_SUPPLEMENTAL = 101 , TASE2_VALUE_TYPE_STATE_OR_DISCRETE = 102
}
 
enum  Tase2_Endpoint_State {
  TASE2_ENDPOINT_STATE_IDLE = 0 , TASE2_ENDPOINT_STATE_LISTENING = 1 , TASE2_ENDPOINT_STATE_CONNECTED = 2 , TASE2_ENDPOINT_STATE_CONNECTING = 3 ,
  TASE2_ENDPOINT_STATE_ERROR = 4
}
 
enum  Tase2_ALS_Mode { TASE2_ALS_MODE_UNSECURE = 0 , TASE2_ALS_MODE_BOTH = 1 , TASE2_ALS_MODE_SECURE = 2 }
 
enum  Tase2_AuthenticationMethod {
  TASE2_AUTH_TYPE_NONE = 0 , TASE2_AUTH_TYPE_PASSWORD = 1 , TASE2_AUTH_TYPE_CERTIFICATE = 2 , TASE2_AUTH_TYPE_TLS = 3 ,
  TASE2_AUTH_TYPE_UNKNOWN = 99
}
 Authentication mechanism used by peer. More...
 

Functions

TASE2_API void Tase2_Library_setLogLevel (Tase2_LogLevel level)
 Set the library log level.
 
TASE2_API void Tase2_Library_setLogFunction (Tase2_Log_Function logFunction)
 Set a user provided log message handler.
 
TASE2_API void Tase2_Library_setLogFunctionEx (Tase2_Log_FunctionEx logFunction)
 
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.
 
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_API Tase2_Endpoint Tase2_Endpoint_create (TLSConfiguration tlsConfig, bool passive)
 Create a new endpoint instance.
 
TASE2_API bool Tase2_Endpoint_isPassive (Tase2_Endpoint self)
 Check if endpoint is in passive mode.
 
TASE2_API void Tase2_Endpoint_setTLSConfiguration (Tase2_Endpoint self, TLSConfiguration tlsConfig)
 Set the TLS configuration.
 
TASE2_API void Tase2_Endpoint_setALSMode (Tase2_Endpoint self, Tase2_ALS_Mode mode)
 Set the ALS (application layer security) mode.
 
TASE2_API void Tase2_Endpoint_setALSConfiguration (Tase2_Endpoint self, ASecurityConfiguration secConfig)
 Set application layer security (ALS) configuration.
 
TASE2_API void Tase2_Endpoint_setStateChangedHandler (Tase2_Endpoint self, Tase2_Endpoint_StateChangedHandler handler, void *parameter)
 Set a handler that is called whenever the state of the endpoint changes.
 
TASE2_API void Tase2_Endpoint_setConnectionHandler (Tase2_Endpoint self, Tase2_Endpoint_ConnectionHandler handler, void *parameter)
 Set a handler that is called whenever a connection to a remote endpoint is opened or closed.
 
TASE2_API void Tase2_Endpoint_setConnectionAcceptHandler (Tase2_Endpoint self, Tase2_Endpoint_ConnectionAcceptHandler handler, void *parameter)
 Set the peer connection handler that is called when a peer tries to connect.
 
TASE2_API void Tase2_Endpoint_setALSConfigurationProvider (Tase2_Endpoint self, Tase2_Endpoint_ALSConfigurationProvider provider, void *parameter)
 Set a ALS configuration provider. This enables the user to provide a connection specific ASecurityConfiguration instance for ALS setup.
 
TASE2_API void Tase2_Endpoint_setAddressMatchingRules (Tase2_Endpoint self, bool apTitle, bool aeQualifier, bool pSelector, bool sSelector, bool tSelector)
 Set the address matching rules for identifying peer endpoints.
 
TASE2_API void Tase2_Endpoint_setIdentity (Tase2_Endpoint self, const char *vendor, const char *model, const char *revision)
 Set own identity for the identity service.
 
TASE2_API Tase2_ApplicationAddress Tase2_Endpoint_getLocalApplicationAddress (Tase2_Endpoint self)
 Get the local application address instance.
 
TASE2_API void Tase2_Endpoint_setLocalApTitle (Tase2_Endpoint self, const char *apTitle, int aeQualifier)
 Set the local AP-title value.
 
TASE2_API void Tase2_Endpoint_setLocalAddresses (Tase2_Endpoint self, Tase2_PSelector pSelector, Tase2_SSelector sSelector, Tase2_TSelector tSelector)
 Sets the local addresses for ISO layers (transport, session, presentation)
 
TASE2_API void Tase2_Endpoint_setLocalIpAddress (Tase2_Endpoint self, const char *ipAddress)
 Sets the local IP address (only for passive mode)
 
TASE2_API void Tase2_Endpoint_setLocalTcpPort (Tase2_Endpoint self, int tcpPort)
 Sets the local TCP port (only for passive mode)
 
TASE2_API void Tase2_Endpoint_setLocalApTitleEx (Tase2_Endpoint self, const char *apTitle)
 Set local AP-title.
 
TASE2_API void Tase2_Endpoint_setLocalAeQualifier (Tase2_Endpoint self, int aeQualifier)
 Set local AE-qualifier.
 
TASE2_API void Tase2_Endpoint_setLocalAeInvocationId (Tase2_Endpoint self, int aeInvocationId)
 Set local AE-invocation-ID.
 
TASE2_API void Tase2_Endpoint_setLocalApInvocationId (Tase2_Endpoint self, int apInvocationId)
 Set local AP-invocation-ID.
 
TASE2_API Tase2_ApplicationAddress Tase2_Endpoint_getRemoteApplicationAddress (Tase2_Endpoint self)
 Get the default remote application address instance.
 
TASE2_API void Tase2_Endpoint_setRemoteApTitle (Tase2_Endpoint self, const char *apTitle, int aeQualifier)
 Set remote AP-title and AE-qualifier (for active endpoint)
 
TASE2_API void Tase2_Endpoint_setRemoteAddresses (Tase2_Endpoint self, Tase2_PSelector pSelector, Tase2_SSelector sSelector, Tase2_TSelector tSelector)
 Sets the remote addresses for ISO layers (transport, session, presentation)
 
TASE2_API void Tase2_Endpoint_setRemoteIpAddress (Tase2_Endpoint self, const char *ipAddress)
 Sets the remote IP address (only for active mode)
 
TASE2_API void Tase2_Endpoint_setRemoteTcpPort (Tase2_Endpoint self, int tcpPort)
 Sets the remote TCP port (only for active mode)
 
TASE2_API void Tase2_Endpoint_setRemoteApTitleEx (Tase2_Endpoint self, const char *apTitle)
 Set remote AP-title (for active endpoint)
 
TASE2_API void Tase2_Endpoint_setRemoteAeQualifier (Tase2_Endpoint self, int aeQualifier)
 Set remote AE-qualifier (for active endpoint)
 
TASE2_API void Tase2_Endpoint_setRemoteAeInvocationId (Tase2_Endpoint self, int aeInvocationId)
 Set remote AE-invocation-ID (for active endpoint)
 
TASE2_API void Tase2_Endpoint_setRemoteApInvocationId (Tase2_Endpoint self, int apInvocationId)
 Set remote AP-invocation-ID (for active endpoint)
 
TASE2_API void Tase2_Endpoint_setMaxMmsPduSize (Tase2_Endpoint self, int maxPduSize)
 Sets the maximum MMS PDU size used by the endpoint.
 
TASE2_API void Tase2_Endpoint_setMaxServOutstandingCalling (Tase2_Endpoint self, int value)
 Set the maximum number of outstanding service calls.
 
TASE2_API void Tase2_Endpoint_setMaxServOutstandingCalled (Tase2_Endpoint self, int value)
 Set the maximum number of outstanding service calls.
 
TASE2_API void Tase2_Endpoint_setRequestTimeout (Tase2_Endpoint self, int timeoutInMs)
 Sets the timeout for confirmed request messages.
 
TASE2_API void Tase2_Endpoint_setWriteTimeout (Tase2_Endpoint self, int timeoutInMs)
 Sets the timeout for writing to TCP sockets.
 
TASE2_API void Tase2_Endpoint_setConnectTimeout (Tase2_Endpoint self, int timeoutInMs)
 Sets the connect timeout of active endpoints.
 
TASE2_API void Tase2_Endpoint_connect (Tase2_Endpoint self)
 Connect the endpoint (start a passive or active TCP endpoint)
 
TASE2_API void Tase2_Endpoint_disconnect (Tase2_Endpoint self, int disconnectMethod)
 Disconnect (close all connections and stop listening for new connections)
 
TASE2_API void Tase2_Endpoint_disconnectPeer (Tase2_Endpoint self, const char *peerIpAddress)
 Disconnect a specific connection identified by the IP address and optionally by the port number.
 
TASE2_API bool Tase2_Endpoint_isConnected (Tase2_Endpoint self)
 Check if the endpoint is connected with at least one TCP client (passive endpoint) or connected to a TCP server (active endpoint)
 
TASE2_API int Tase2_Endpoint_connectedPeers (Tase2_Endpoint self)
 Get number of connected peers.
 
TASE2_API bool Tase2_Endpoint_waitForState (Tase2_Endpoint self, Tase2_Endpoint_State state, int timeoutInMs)
 Wait until the endpoint enters a specific state of state changes to TASE2_ENDPOINT_STATE_ERROR.
 
TASE2_API Tase2_Endpoint_State Tase2_Endpoint_getState (Tase2_Endpoint self)
 Get the current state of the endpoint.
 
TASE2_API void Tase2_Endpoint_addServer (Tase2_Endpoint self, Tase2_Server server)
 Add a server to the endpoint.
 
TASE2_API Tase2_Server Tase2_Endpoint_removeServer (Tase2_Endpoint self, Tase2_Server server)
 Remove a server from the endpoint.
 
TASE2_API Tase2_Client Tase2_Endpoint_removeClient (Tase2_Endpoint self, Tase2_Client client)
 Remove a client from the endpoint.
 
TASE2_API void Tase2_Endpoint_destroy (Tase2_Endpoint self)
 Delete the endpoint and release all resources.
 
TASE2_API const char * Tase2_Endpoint_getId (Tase2_Endpoint self)
 Get the ID string of the endpoint.
 
TASE2_API void Tase2_Endpoint_setId (Tase2_Endpoint self, const char *id)
 Set the ID string of the endpoint.
 
TASE2_API char * Tase2_Endpoint_Connection_getPeerIpAddress (Tase2_Endpoint_Connection self)
 Get the address of the peer application (IP address and port number)
 
TASE2_API char * Tase2_Endpoint_Connection_getPeerApTitle (Tase2_Endpoint_Connection self)
 Get the ISO ACSE AP-title of the peer.
 
TASE2_API Tase2_TSelectorTase2_Endpoint_Connection_getPeerTSel (Tase2_Endpoint_Connection self)
 Get the T selector of the peer.
 
TASE2_API Tase2_SSelectorTase2_Endpoint_Connection_getPeerSSel (Tase2_Endpoint_Connection self)
 Get the S selector of the peer.
 
TASE2_API Tase2_PSelectorTase2_Endpoint_Connection_getPeerPSel (Tase2_Endpoint_Connection self)
 Get the P selector of the peer.
 
TASE2_API int Tase2_Endpoint_Connection_getPeerAeQualifier (Tase2_Endpoint_Connection self)
 Get the ISO ACSE AE-qualifier of the peer.
 
TASE2_API int Tase2_Endpoint_Connection_getMaxPduSize (Tase2_Endpoint_Connection self)
 Get the maximum MMS PDU size used by this connection.
 

Detailed Description

Typedef Documentation

◆ Tase2_BilateralTable

typedef struct sTase2_BilateralTable* Tase2_BilateralTable

◆ Tase2_Client

typedef struct sTase2_Client* Tase2_Client

A TASE.2 client to communicate with a single TASE.2 server.

◆ Tase2_Endpoint

typedef struct sTase2_Endpoint* Tase2_Endpoint

A TASE.2 endpoint that can be configured as passive (TCP server) or active (TCP client)

◆ Tase2_Endpoint_ALSConfigurationProvider

typedef ASecurityConfiguration(* Tase2_Endpoint_ALSConfigurationProvider) (Tase2_Endpoint endpoint, void *parameter, const char *peerAddress, Tase2_ApplicationAddress localApAddr, Tase2_ApplicationAddress remoteApAddr)

Callback handler to provide a connection specific ASecurityConfiguration instance for ALS setup.

This callback is called during the ACSE connection setup. It's purpose is to enable the user to provide a connection specific application layer security configuration.

Note
The returned ASecurityConfiguration instance's ownership will be transfered to the Tase2_Endpoint and will be release with ASecurityConfiguration_destroy as soon as it is no longer needed by the connection. In case you want to reuse the ASecurityConfiguration instance after the return of the callback you have to call ASecurityConfiguration_claimOwnership before the callback returns.
Parameters
endpointthe endpoint instance
parameteruser provided parameter
clientAddressclient IP address and port number (only valid in the context of the callback function)
localApAddrthe local application address of the association
remoteApAddrthe remote application address of the association
Returns
a connection specific ASecurityConfiguration instance or NULL (in case of NULL the association will be rejected)

◆ Tase2_Endpoint_Connection

typedef struct sTase2_Endpoint_Connection* Tase2_Endpoint_Connection

Represents a connection to another connected TASE.2 endpoint.

◆ Tase2_Endpoint_ConnectionAcceptHandler

typedef bool(* Tase2_Endpoint_ConnectionAcceptHandler) (Tase2_Endpoint endpoint, void *parameter, const char *peerAddress, Tase2_BilateralTable clientBlt, Tase2_AuthenticationMethod authType, uint8_t *authValue, int authValLen)

Callback handler to accept/reject new connections.

Parameters
peerAddressuser provided parameter
clientAddressclient IP address and port number (only valid in the context of the callback function)
clientBltthe BLT associated with the client
authTypeauthentication method used by the peer
authValuebuffer address of the authentication value provided by peer (e.g. password or TLS certificate)
authValLenlength of the buffer of the authentication value
Returns
true to accept connection, false to reject connection

◆ Tase2_Endpoint_ConnectionHandler

typedef void(* Tase2_Endpoint_ConnectionHandler) (Tase2_Endpoint endpoint, void *parameter, Tase2_Endpoint_Connection connection, bool connect)

Callback function is called when another endpoint is connected or diconnected to the local endpoint.

Parameters
endpointthe local endpoint instance
paramuser provided context parameter
connectionthe connection to the remote endpoint
connecttrue when a new connection was opened, false when a connection was closed

◆ Tase2_Endpoint_StateChangedHandler

typedef void(* Tase2_Endpoint_StateChangedHandler) (Tase2_Endpoint endpoint, void *parameter, Tase2_Endpoint_State newState)

Callback function is called whenever the state of the endpoint changes.

Parameters
endpointthe endpoint instance
parameteruser provided context parameter
newStatethe new endpoint state

◆ Tase2_Log_Function

typedef void(* Tase2_Log_Function) (int logLevel, const char *message)

User provided log message handler (optional)

◆ Tase2_Log_FunctionEx

typedef void(* Tase2_Log_FunctionEx) (Tase2_LogLevel logLevel, Tase2_LogSource source, Tase2_Endpoint endpoint, Tase2_Endpoint_Connection peer, const char *message)

◆ Tase2_Server

typedef struct sTase2_Server* Tase2_Server

Handle for a Tase2_Server instance (representing a TASE.2/MMS server)

Enumeration Type Documentation

◆ Tase2_ALS_Mode

Enumerator
TASE2_ALS_MODE_UNSECURE 

allow only unsecure connection (don't use application layer security - ALS)

TASE2_ALS_MODE_BOTH 

allow secure and unsecure connections

TASE2_ALS_MODE_SECURE 

only allow secure connections (application layer security - ALS/STASE)

◆ Tase2_AuthenticationMethod

Authentication mechanism used by peer.

Enumerator
TASE2_AUTH_TYPE_NONE 

Neither ACSE nor TLS authentication used

TASE2_AUTH_TYPE_PASSWORD 

Use ACSE password for peer authentication

TASE2_AUTH_TYPE_CERTIFICATE 

Use ACSE certificate for peer authentication

TASE2_AUTH_TYPE_TLS 

Use TLS certificate for peer authentication

TASE2_AUTH_TYPE_UNKNOWN 

Unknown mechanism for peer authentication

◆ Tase2_ClientError

Client side error code.

Enumerator
TASE2_CLIENT_ERROR_OK 

No error occurred (request has been successful)

TASE2_CLIENT_ERROR_FAILED 

Request failed

TASE2_CLIENT_ERROR_TIMEOUT 

Request timeout

TASE2_CLIENT_ERROR_ACCESS_DENIED 

Access denied by server

TASE2_CLIENT_ERROR_TEMPORARILY_UNAVAILABLE 

Server resource is temporarily unavailable

TASE2_CLIENT_ERROR_INVALID_ARGUMENT 

invalid argument

TASE2_CLIENT_ERROR_INVALID_RETURN_VALUE 

server return value invalid

TASE2_CLIENT_ERROR_OTHER 

other error

TASE2_CLIENT_ERROR_OBJECT_NOT_EXISTING 

object does not exist

TASE2_CLIENT_ERROR_OBJECT_EXISTS 

object already exists

◆ Tase2_Endpoint_State

Enumerator
TASE2_ENDPOINT_STATE_IDLE 

endpoint has not been used yet.

TASE2_ENDPOINT_STATE_LISTENING 

passive endpoint is listening for incoming TCP client connections.

TASE2_ENDPOINT_STATE_CONNECTED 

active endpoint is connected to remote TCP server.

TASE2_ENDPOINT_STATE_CONNECTING 

active endpoint is connecting to remote TCP server.

TASE2_ENDPOINT_STATE_ERROR 

connection attempt failed or endpoint cannot allocate local TCP port.

◆ Tase2_IndicationPointType

Enumerator
TASE2_IND_POINT_TYPE_REAL 
TASE2_IND_POINT_TYPE_STATE 
TASE2_IND_POINT_TYPE_DISCRETE 
TASE2_IND_POINT_TYPE_STATE_SUPPLEMENTAL 

◆ Tase2_LogLevel

Specify the log level for the library internal logging.

Enumerator
TASE2_LOG_DEBUG 

log level DEBUG - shows the most information (useful for debugging applications)

TASE2_LOG_INFO 

log level INFO - show informational messages (useful to trace communication problems)

TASE2_LOG_WARNING 

log level WARNING - show only errors and warning message that indicate wrong configuration

TASE2_LOG_ERROR 

log level ERROR - show critical problems and communication errors

TASE2_LOG_NONE 

log level NONE - don't show any log messages

◆ Tase2_LogSource

Enumerator
TASE2_LOG_SOURCE_ICCP 
TASE2_LOG_SOURCE_MMS 
TASE2_LOG_SOURCE_TCP 
TASE2_LOG_SOURCE_TLS 
TASE2_LOG_SOURCE_ISO_LAYERS 

◆ Tase2_PointValueType

Enumerator
TASE2_VALUE_TYPE_STATE 

Point value is of State type

TASE2_VALUE_TYPE_STATE_SUPPLEMENTAL 

Point value is of StateSupplemental type

TASE2_VALUE_TYPE_DISCRETE 

Point value is of Discrete type

TASE2_VALUE_TYPE_REAL 

Point value is of Real type

TASE2_VALUE_TYPE_SINGLE_EVENT 

Point value is a Single event

TASE2_VALUE_TYPE_PACKED_EVENT 

Point value is a Packed Event

TASE2_VALUE_TYPE_ERROR 

Point value instance represents an error (no point value received)

TASE2_VALUE_TYPE_UNKNOWN 

Point value type cannot be determined

TASE2_VALUE_TYPE_STATE_OR_STATE_SUPPLEMENTAL 

Point value is either State or StateSupplemental (ambiguous type)

TASE2_VALUE_TYPE_STATE_OR_DISCRETE 

Point value is either State or Discrete (ambiguous type)

◆ Tase2_QualityClass

Enumerator
TASE2_NO_QUALITY 
TASE2_QUALITY 

◆ Tase2_ReportReason

Enumerator
TASE2_REPORT_REASON_INTERVAL_TIMEOUT 
TASE2_REPORT_REASON_INTEGRITY_TIMEOUT 
TASE2_REPORT_REASON_OBJECT_CHANGE 
TASE2_REPORT_REASON_OPERATOR_REQUESTED 
TASE2_REPORT_REASON_OTHER_EXTERNAL_EVENT 

◆ Tase2_TagValue

Enumerator
TASE2_TAG_NO_TAG 

No tag present

TASE2_TAG_OPEN_AND_CLOSE_INHIBIT 

The tag prohibits to open or close the device

TASE2_TAG_CLOSE_ONLY_INHIBIT 

Tag tag allow to open but inhibits to close the device

TASE2_TAG_INVALID 

The device has an invalid tag

◆ Tase2_TimeStampClass

Enumerator
TASE2_NO_TIMESTAMP 

The indication point or type has no time stamp

TASE2_TIMESTAMP 

The indication point or type has a time stamp with seconds precision

TASE2_TIMESTAMP_EXTENDED 

The indication point or type has a time stamp with milliseconds precision

Function Documentation

◆ Tase2_Endpoint_addServer()

TASE2_API void Tase2_Endpoint_addServer ( Tase2_Endpoint self,
Tase2_Server server )

Add a server to the endpoint.

NOTE: This function can be used to add a server to an endpoint that has been removed before using the Tase2_Endpoint_removeServer function

Parameters
serverthe server to be added

◆ Tase2_Endpoint_connect()

TASE2_API void Tase2_Endpoint_connect ( Tase2_Endpoint self)

Connect the endpoint (start a passive or active TCP endpoint)

◆ Tase2_Endpoint_connectedPeers()

TASE2_API int Tase2_Endpoint_connectedPeers ( Tase2_Endpoint self)

Get number of connected peers.

Returns
number of connected peers

◆ Tase2_Endpoint_Connection_getMaxPduSize()

TASE2_API int Tase2_Endpoint_Connection_getMaxPduSize ( Tase2_Endpoint_Connection self)

Get the maximum MMS PDU size used by this connection.

Returns
the maximum MMS PDU size

◆ Tase2_Endpoint_Connection_getPeerAeQualifier()

TASE2_API int Tase2_Endpoint_Connection_getPeerAeQualifier ( Tase2_Endpoint_Connection self)

Get the ISO ACSE AE-qualifier of the peer.

Returns
the AE-qualifier value

◆ Tase2_Endpoint_Connection_getPeerApTitle()

TASE2_API char * Tase2_Endpoint_Connection_getPeerApTitle ( Tase2_Endpoint_Connection self)

Get the ISO ACSE AP-title of the peer.

NOTE: The memory of the returned string is managed by the library! The string is only valid in the context of the callback function or when used outside a callback as long as the Tase2_Endpoint_Connection object exists. This changed with version 2.1!

Returns
the AP-title as string. The AP-title parts are separated by dots ('.')

◆ Tase2_Endpoint_Connection_getPeerIpAddress()

TASE2_API char * Tase2_Endpoint_Connection_getPeerIpAddress ( Tase2_Endpoint_Connection self)

Get the address of the peer application (IP address and port number)

NOTE: The memory of the returned string is managed by the library! The string is only valid in the context of the callback function or when used outside a callback as long as the Tase2_Endpoint_Connection object exists. This changed with version 2.1!

Parameters
selfthe Tase2_Endpoint_Connection instance
Returns
the IP address and port number as strings separated by the ':' character.

◆ Tase2_Endpoint_Connection_getPeerPSel()

TASE2_API Tase2_PSelector * Tase2_Endpoint_Connection_getPeerPSel ( Tase2_Endpoint_Connection self)

Get the P selector of the peer.

NOTE: The returned object is managed by the library! It is only valid in the context of the callback function or when used outside a callback as long as the Tase2_Endpoint_Connection object exists.

Returns
the P selector

◆ Tase2_Endpoint_Connection_getPeerSSel()

TASE2_API Tase2_SSelector * Tase2_Endpoint_Connection_getPeerSSel ( Tase2_Endpoint_Connection self)

Get the S selector of the peer.

NOTE: The returned object is managed by the library! It is only valid in the context of the callback function or when used outside a callback as long as the Tase2_Endpoint_Connection object exists.

Returns
the S selector

◆ Tase2_Endpoint_Connection_getPeerTSel()

TASE2_API Tase2_TSelector * Tase2_Endpoint_Connection_getPeerTSel ( Tase2_Endpoint_Connection self)

Get the T selector of the peer.

NOTE: The returned object is managed by the library! It is only valid in the context of the callback function or when used outside a callback as long as the Tase2_Endpoint_Connection object exists.

Returns
the T selector

◆ Tase2_Endpoint_create()

TASE2_API Tase2_Endpoint Tase2_Endpoint_create ( TLSConfiguration tlsConfig,
bool passive )

Create a new endpoint instance.

Parameters
tlsConfigTLS configuration object, or null for not using TLS
passivetrue for passive mode (TCP server), false for active mode (TCP client).
Returns
the new endpoint instance.

◆ Tase2_Endpoint_destroy()

TASE2_API void Tase2_Endpoint_destroy ( Tase2_Endpoint self)

Delete the endpoint and release all resources.

NOTE: Do not use the endpoint instance after this call!

◆ Tase2_Endpoint_disconnect()

TASE2_API void Tase2_Endpoint_disconnect ( Tase2_Endpoint self,
int disconnectMethod )

Disconnect (close all connections and stop listening for new connections)

◆ Tase2_Endpoint_disconnectPeer()

TASE2_API void Tase2_Endpoint_disconnectPeer ( Tase2_Endpoint self,
const char * peerIpAddress )

Disconnect a specific connection identified by the IP address and optionally by the port number.

NOTE: This is for passive endpoint only

Parameters
peerIpAddresspeer IP address (e.g. "10.0.0.10") with optional port number (e.g. "10.0.0.10:34237")

◆ Tase2_Endpoint_getId()

TASE2_API const char * Tase2_Endpoint_getId ( Tase2_Endpoint self)

Get the ID string of the endpoint.

The ID string can be used by the application to identify the endpoint.

The returned string is managed by the endpoint instance and is only valid until the Tase2_Endpoint_destroy function is called.

Returns
the ID string of the endpoint

◆ Tase2_Endpoint_getLocalApplicationAddress()

TASE2_API Tase2_ApplicationAddress Tase2_Endpoint_getLocalApplicationAddress ( Tase2_Endpoint self)

Get the local application address instance.

NOTE: modifying the structure elements will immediately change the active address. For a more comfortable handling please use the functions below.

Parameters
selfendpoint instance to use
Returns
local application address

◆ Tase2_Endpoint_getRemoteApplicationAddress()

TASE2_API Tase2_ApplicationAddress Tase2_Endpoint_getRemoteApplicationAddress ( Tase2_Endpoint self)

Get the default remote application address instance.

NOTE: modifying the structure elements will immediately change the active address. For a more comfortable handling please use the functions below.

Parameters
selfendpoint instance to use
Returns
remote application address

◆ Tase2_Endpoint_getState()

TASE2_API Tase2_Endpoint_State Tase2_Endpoint_getState ( Tase2_Endpoint self)

Get the current state of the endpoint.

NOTE: Possible values depend on the endpoint type (active/passive).

Returns
current state of the endpoint

◆ Tase2_Endpoint_isConnected()

TASE2_API bool Tase2_Endpoint_isConnected ( Tase2_Endpoint self)

Check if the endpoint is connected with at least one TCP client (passive endpoint) or connected to a TCP server (active endpoint)

Returns
true if the endpoint is connected, false otherwise

◆ Tase2_Endpoint_isPassive()

TASE2_API bool Tase2_Endpoint_isPassive ( Tase2_Endpoint self)

Check if endpoint is in passive mode.

Parameters
selfendpoint instance to use
Returns
true when the endpoint is passive, false when active

◆ Tase2_Endpoint_removeClient()

TASE2_API Tase2_Client Tase2_Endpoint_removeClient ( Tase2_Endpoint self,
Tase2_Client client )

Remove a client from the endpoint.

Parameters
clientthe client to be removed
Returns
the removed client, or NULL when the client was not associated with this endpoint

◆ Tase2_Endpoint_removeServer()

TASE2_API Tase2_Server Tase2_Endpoint_removeServer ( Tase2_Endpoint self,
Tase2_Server server )

Remove a server from the endpoint.

Parameters
serverthe server to be removed
Returns
the removed server, or NULL when server was not associated with this endpoint

◆ Tase2_Endpoint_setAddressMatchingRules()

TASE2_API void Tase2_Endpoint_setAddressMatchingRules ( Tase2_Endpoint self,
bool apTitle,
bool aeQualifier,
bool pSelector,
bool sSelector,
bool tSelector )

Set the address matching rules for identifying peer endpoints.

Parameters
selfendpoint instance to use
apTitletrue, use AP-title for matching
aeQualifiertrue, use AE-qualifier for matching
pSelectortrue, use presentation selector for matching
sSelectortrue, use session selector for matching
tSelectortrue, use transport selector for matching

◆ Tase2_Endpoint_setALSConfiguration()

TASE2_API void Tase2_Endpoint_setALSConfiguration ( Tase2_Endpoint self,
ASecurityConfiguration secConfig )

Set application layer security (ALS) configuration.

New in version 2.4.0

Parameters
selfendpoint instance to use
secConfigALS configuration

◆ Tase2_Endpoint_setALSConfigurationProvider()

TASE2_API void Tase2_Endpoint_setALSConfigurationProvider ( Tase2_Endpoint self,
Tase2_Endpoint_ALSConfigurationProvider provider,
void * parameter )

Set a ALS configuration provider. This enables the user to provide a connection specific ASecurityConfiguration instance for ALS setup.

Parameters
selfTase2_Server instance
providerthe callback function to provide the ASecurityConfiguration instance to be used during the connection setup
parameteruser provided parameter that is passed to the callback handler

◆ Tase2_Endpoint_setALSMode()

TASE2_API void Tase2_Endpoint_setALSMode ( Tase2_Endpoint self,
Tase2_ALS_Mode mode )

Set the ALS (application layer security) mode.

New in version 2.4.0

Parameters
selfendpoint instance to use
modeALS mode, one of TASE2_ALS_MODE_UNSECURE, TASE2_ALS_MODE_BOTH, TASE2_ALS_MODE_SECURE

◆ Tase2_Endpoint_setConnectionAcceptHandler()

TASE2_API void Tase2_Endpoint_setConnectionAcceptHandler ( Tase2_Endpoint self,
Tase2_Endpoint_ConnectionAcceptHandler handler,
void * parameter )

Set the peer connection handler that is called when a peer tries to connect.

NOTE: This handler can be used to control if a new connection is accepted or rejected

Parameters
selfTase2_Server instance
handlerthe callback handler function
parameteruser provided parameter that is passed to the callback handler

◆ Tase2_Endpoint_setConnectionHandler()

TASE2_API void Tase2_Endpoint_setConnectionHandler ( Tase2_Endpoint self,
Tase2_Endpoint_ConnectionHandler handler,
void * parameter )

Set a handler that is called whenever a connection to a remote endpoint is opened or closed.

Parameters
selfendpoint instance to use
handlerthe callback function
parameterparameter that is passed to the callback function

◆ Tase2_Endpoint_setConnectTimeout()

TASE2_API void Tase2_Endpoint_setConnectTimeout ( Tase2_Endpoint self,
int timeoutInMs )

Sets the connect timeout of active endpoints.

Default value is 10000 ms.

Parameters
selfendpoint instance to use
timeoutInMstimeout in milliseconds

◆ Tase2_Endpoint_setId()

TASE2_API void Tase2_Endpoint_setId ( Tase2_Endpoint self,
const char * id )

Set the ID string of the endpoint.

The ID string can be used by the application to identify the endpoint.

Parameters
theID string of the endpoint

◆ Tase2_Endpoint_setIdentity()

TASE2_API void Tase2_Endpoint_setIdentity ( Tase2_Endpoint self,
const char * vendor,
const char * model,
const char * revision )

Set own identity for the identity service.

Parameters
selfendpoint instance to use
vendorthe vendor name of the TASE.2 application
modelthe model name of the TASE.2 application
revisionthe revision string of the TASE.2 application

◆ Tase2_Endpoint_setLocalAddresses()

TASE2_API void Tase2_Endpoint_setLocalAddresses ( Tase2_Endpoint self,
Tase2_PSelector pSelector,
Tase2_SSelector sSelector,
Tase2_TSelector tSelector )

Sets the local addresses for ISO layers (transport, session, presentation)

Parameters
selfendpoint instance to use
pSelectorpresentation layer address
sSelectorsession layer address
tSelectorISO COTP layer address

◆ Tase2_Endpoint_setLocalAeInvocationId()

TASE2_API void Tase2_Endpoint_setLocalAeInvocationId ( Tase2_Endpoint self,
int aeInvocationId )

Set local AE-invocation-ID.

Parameters
selfendpoint instance to use
aeInvocationIdthe new AE-invocation-ID value

◆ Tase2_Endpoint_setLocalAeQualifier()

TASE2_API void Tase2_Endpoint_setLocalAeQualifier ( Tase2_Endpoint self,
int aeQualifier )

Set local AE-qualifier.

Parameters
selfendpoint instance to use
aeQualifierthe new AE-qualifier value

◆ Tase2_Endpoint_setLocalApInvocationId()

TASE2_API void Tase2_Endpoint_setLocalApInvocationId ( Tase2_Endpoint self,
int apInvocationId )

Set local AP-invocation-ID.

Parameters
selfendpoint instance to use
apInvocationIdthe new AP-invocation-ID value

◆ Tase2_Endpoint_setLocalApTitle()

TASE2_API void Tase2_Endpoint_setLocalApTitle ( Tase2_Endpoint self,
const char * apTitle,
int aeQualifier )

Set the local AP-title value.

Parameters
selfendpoint instance to use
apTitlethe new AP-title value
aeQualifierthe new AE-qualifier value

◆ Tase2_Endpoint_setLocalApTitleEx()

TASE2_API void Tase2_Endpoint_setLocalApTitleEx ( Tase2_Endpoint self,
const char * apTitle )

Set local AP-title.

Parameters
selfendpoint instance to use
apTitlethe new AP-title value

◆ Tase2_Endpoint_setLocalIpAddress()

TASE2_API void Tase2_Endpoint_setLocalIpAddress ( Tase2_Endpoint self,
const char * ipAddress )

Sets the local IP address (only for passive mode)

Parameters
selfendpoint instance to use
ipAddresslocal IP address to use.

◆ Tase2_Endpoint_setLocalTcpPort()

TASE2_API void Tase2_Endpoint_setLocalTcpPort ( Tase2_Endpoint self,
int tcpPort )

Sets the local TCP port (only for passive mode)

If not set, the default port is used (102 for MMS, 3872 for MMS/TLS).

Parameters
selfendpoint instance to use
tcpPortlocal TCP port to use.

◆ Tase2_Endpoint_setMaxMmsPduSize()

TASE2_API void Tase2_Endpoint_setMaxMmsPduSize ( Tase2_Endpoint self,
int maxPduSize )

Sets the maximum MMS PDU size used by the endpoint.

NOTE: Actual values are negotiated with the peer and are equal or below this value.

Parameters
selfendpoint instance to use
maxPduSizethe maximum PDU size in bytes

◆ Tase2_Endpoint_setMaxServOutstandingCalled()

TASE2_API void Tase2_Endpoint_setMaxServOutstandingCalled ( Tase2_Endpoint self,
int value )

Set the maximum number of outstanding service calls.

NOTE: the effective value may depend on the other endpoint as well.

Parameters
selfendpoint instance to use
valuethe maximum number of outstanding service calls

◆ Tase2_Endpoint_setMaxServOutstandingCalling()

TASE2_API void Tase2_Endpoint_setMaxServOutstandingCalling ( Tase2_Endpoint self,
int value )

Set the maximum number of outstanding service calls.

NOTE: the effective value may depend on the other endpoint as well.

Parameters
selfendpoint instance to use
valuethe maximum number of outstanding service calls

◆ Tase2_Endpoint_setRemoteAddresses()

TASE2_API void Tase2_Endpoint_setRemoteAddresses ( Tase2_Endpoint self,
Tase2_PSelector pSelector,
Tase2_SSelector sSelector,
Tase2_TSelector tSelector )

Sets the remote addresses for ISO layers (transport, session, presentation)

Parameters
selfendpoint instance to use
pSelectorpresentation layer address
sSelectorsession layer address
tSelectorISO COTP layer address

◆ Tase2_Endpoint_setRemoteAeInvocationId()

TASE2_API void Tase2_Endpoint_setRemoteAeInvocationId ( Tase2_Endpoint self,
int aeInvocationId )

Set remote AE-invocation-ID (for active endpoint)

Parameters
selfendpoint instance to use
aeInvocationIdthe new AE-invocation-ID value

◆ Tase2_Endpoint_setRemoteAeQualifier()

TASE2_API void Tase2_Endpoint_setRemoteAeQualifier ( Tase2_Endpoint self,
int aeQualifier )

Set remote AE-qualifier (for active endpoint)

Parameters
selfendpoint instance to use
aeQualifierthe new AE-qualifier value

◆ Tase2_Endpoint_setRemoteApInvocationId()

TASE2_API void Tase2_Endpoint_setRemoteApInvocationId ( Tase2_Endpoint self,
int apInvocationId )

Set remote AP-invocation-ID (for active endpoint)

Parameters
selfendpoint instance to use
apInvocationIdthe new AP-invocation-ID value

◆ Tase2_Endpoint_setRemoteApTitle()

TASE2_API void Tase2_Endpoint_setRemoteApTitle ( Tase2_Endpoint self,
const char * apTitle,
int aeQualifier )

Set remote AP-title and AE-qualifier (for active endpoint)

Parameters
selfendpoint instance to use
apTitlethe new AP-title value
aeQualifierthe new AE-qualifier value

◆ Tase2_Endpoint_setRemoteApTitleEx()

TASE2_API void Tase2_Endpoint_setRemoteApTitleEx ( Tase2_Endpoint self,
const char * apTitle )

Set remote AP-title (for active endpoint)

Parameters
selfendpoint instance to use
apTitlethe new AP-title value

◆ Tase2_Endpoint_setRemoteIpAddress()

TASE2_API void Tase2_Endpoint_setRemoteIpAddress ( Tase2_Endpoint self,
const char * ipAddress )

Sets the remote IP address (only for active mode)

Parameters
selfendpoint instance to use
ipAddressremote IP address to use.

◆ Tase2_Endpoint_setRemoteTcpPort()

TASE2_API void Tase2_Endpoint_setRemoteTcpPort ( Tase2_Endpoint self,
int tcpPort )

Sets the remote TCP port (only for active mode)

If not set, the default port is used (102 for MMS, 3872 for MMS/TLS).

Parameters
selfendpoint instance to use
tcpPortremote TCP port to use.

◆ Tase2_Endpoint_setRequestTimeout()

TASE2_API void Tase2_Endpoint_setRequestTimeout ( Tase2_Endpoint self,
int timeoutInMs )

Sets the timeout for confirmed request messages.

Default value is 5000 ms.

Parameters
selfendpoint instance to use
timeoutInMstimeout in milliseconds

◆ Tase2_Endpoint_setStateChangedHandler()

TASE2_API void Tase2_Endpoint_setStateChangedHandler ( Tase2_Endpoint self,
Tase2_Endpoint_StateChangedHandler handler,
void * parameter )

Set a handler that is called whenever the state of the endpoint changes.

Parameters
selfendpoint instance to use
handlerthe callback function
parameterparameter that is passed to the callback function

◆ Tase2_Endpoint_setTLSConfiguration()

TASE2_API void Tase2_Endpoint_setTLSConfiguration ( Tase2_Endpoint self,
TLSConfiguration tlsConfig )

Set the TLS configuration.

New in version 2.1.0

Parameters
selfendpoint instance to use
tlsConfigTLS configuration object, or null for not using TLS

◆ Tase2_Endpoint_setWriteTimeout()

TASE2_API void Tase2_Endpoint_setWriteTimeout ( Tase2_Endpoint self,
int timeoutInMs )

Sets the timeout for writing to TCP sockets.

Default value is 5000 ms.

Parameters
selfendpoint instance to use
timeoutInMstimeout in milliseconds

◆ Tase2_Endpoint_waitForState()

TASE2_API bool Tase2_Endpoint_waitForState ( Tase2_Endpoint self,
Tase2_Endpoint_State state,
int timeoutInMs )

Wait until the endpoint enters a specific state of state changes to TASE2_ENDPOINT_STATE_ERROR.

Parameters
statethe expected state (state to wait for)
timeoutmaximum time to wait for the expected state (in ms)
Returns
true when state is reached, false when timeout or error occurs.

◆ Tase2_Library_getMajorVersion()

TASE2_API int Tase2_Library_getMajorVersion ( )

Get the major version of the library.

◆ Tase2_Library_getMinorVersion()

TASE2_API int Tase2_Library_getMinorVersion ( )

Get the minor version of the library.

◆ Tase2_Library_getPatchVersion()

TASE2_API int Tase2_Library_getPatchVersion ( )

Get the patch version of the library.

◆ Tase2_Library_getVersionString()

TASE2_API const char * Tase2_Library_getVersionString ( )

Get the version string of the library (e.g. "1.2.3")

The format is MAJOR.MINOR.PATCH

◆ Tase2_Library_setLogFunction()

TASE2_API void Tase2_Library_setLogFunction ( Tase2_Log_Function logFunction)

Set a user provided log message handler.

Note: If not set, or set to NULL the log messages will be printed to stdout. Otherwise library internal log messages will be sent to the application by calling the provided function once for each log message.

Parameters
logFunctionuser provided log handler or NULL

◆ Tase2_Library_setLogFunctionEx()

TASE2_API void Tase2_Library_setLogFunctionEx ( Tase2_Log_FunctionEx logFunction)

◆ Tase2_Library_setLogLevel()

TASE2_API void Tase2_Library_setLogLevel ( Tase2_LogLevel level)

Set the library log level.

NOTE: Default log level is TASE2_LOG_INFO

Parameters
levelthe log level to apply