libtase2
2.4.0
TASE.2/ICCP Protocol Source Code Library for C/C++
|
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. | |
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_TSelector * | Tase2_Endpoint_Connection_getPeerTSel (Tase2_Endpoint_Connection self) |
Get the T selector of the peer. | |
TASE2_API Tase2_SSelector * | Tase2_Endpoint_Connection_getPeerSSel (Tase2_Endpoint_Connection self) |
Get the S selector of the peer. | |
TASE2_API Tase2_PSelector * | Tase2_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. | |
typedef struct sTase2_BilateralTable* Tase2_BilateralTable |
typedef struct sTase2_Client* Tase2_Client |
A TASE.2 client to communicate with a single TASE.2 server.
typedef struct sTase2_Endpoint* Tase2_Endpoint |
A TASE.2 endpoint that can be configured as passive (TCP server) or active (TCP client)
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.
endpoint | the endpoint instance |
parameter | user provided parameter |
clientAddress | client IP address and port number (only valid in the context of the callback function) |
localApAddr | the local application address of the association |
remoteApAddr | the remote application address of the association |
typedef struct sTase2_Endpoint_Connection* Tase2_Endpoint_Connection |
Represents a connection to another connected TASE.2 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.
peerAddress | 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 |
authType | authentication method used by the peer |
authValue | buffer address of the authentication value provided by peer (e.g. password or TLS certificate) |
authValLen | length of the buffer of the authentication value |
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.
endpoint | the local endpoint instance |
param | user provided context parameter |
connection | the connection to the remote endpoint |
connect | true when a new connection was opened, false when a connection was closed |
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.
endpoint | the endpoint instance |
parameter | user provided context parameter |
newState | the new endpoint state |
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_Server* Tase2_Server |
Handle for a Tase2_Server instance (representing a TASE.2/MMS server)
enum Tase2_ALS_Mode |
Authentication mechanism used by peer.
enum Tase2_ClientError |
Client side error code.
enum Tase2_Endpoint_State |
enum Tase2_LogLevel |
Specify the log level for the library internal logging.
enum Tase2_LogSource |
enum Tase2_PointValueType |
enum Tase2_QualityClass |
enum Tase2_ReportReason |
enum Tase2_TagValue |
enum Tase2_TimeStampClass |
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
server | the server to be added |
TASE2_API void Tase2_Endpoint_connect | ( | Tase2_Endpoint | self | ) |
Connect the endpoint (start a passive or active TCP endpoint)
TASE2_API int Tase2_Endpoint_connectedPeers | ( | Tase2_Endpoint | self | ) |
Get number of connected peers.
TASE2_API int Tase2_Endpoint_Connection_getMaxPduSize | ( | Tase2_Endpoint_Connection | self | ) |
Get the maximum MMS PDU size used by this connection.
TASE2_API int Tase2_Endpoint_Connection_getPeerAeQualifier | ( | Tase2_Endpoint_Connection | self | ) |
Get the ISO ACSE AE-qualifier of the peer.
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!
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!
self | the Tase2_Endpoint_Connection instance |
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.
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.
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.
TASE2_API Tase2_Endpoint Tase2_Endpoint_create | ( | TLSConfiguration | tlsConfig, |
bool | passive ) |
Create a new endpoint instance.
tlsConfig | TLS configuration object, or null for not using TLS |
passive | true for passive mode (TCP server), false for active mode (TCP client). |
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_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.
NOTE: This is for passive endpoint only
peerIpAddress | peer IP address (e.g. "10.0.0.10") with optional port number (e.g. "10.0.0.10:34237") |
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.
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.
self | endpoint instance to use |
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.
self | endpoint instance to use |
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).
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 bool Tase2_Endpoint_isPassive | ( | Tase2_Endpoint | self | ) |
Check if endpoint is in passive mode.
self | endpoint instance to use |
TASE2_API Tase2_Client Tase2_Endpoint_removeClient | ( | Tase2_Endpoint | self, |
Tase2_Client | client ) |
Remove a client from the endpoint.
client | the client to be removed |
TASE2_API Tase2_Server Tase2_Endpoint_removeServer | ( | Tase2_Endpoint | self, |
Tase2_Server | server ) |
Remove a server from the endpoint.
server | the server to be removed |
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.
self | endpoint instance to use |
apTitle | true, use AP-title for matching |
aeQualifier | true, use AE-qualifier for matching |
pSelector | true, use presentation selector for matching |
sSelector | true, use session selector for matching |
tSelector | true, use transport selector for matching |
TASE2_API void Tase2_Endpoint_setALSConfiguration | ( | Tase2_Endpoint | self, |
ASecurityConfiguration | secConfig ) |
Set application layer security (ALS) configuration.
New in version 2.4.0
self | endpoint instance to use |
secConfig | ALS configuration |
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.
self | Tase2_Server instance |
provider | the callback function to provide the ASecurityConfiguration instance to be used during the connection setup |
parameter | user provided parameter that is passed to the callback handler |
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
self | endpoint instance to use |
mode | ALS mode, one of TASE2_ALS_MODE_UNSECURE, TASE2_ALS_MODE_BOTH, TASE2_ALS_MODE_SECURE |
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
self | Tase2_Server instance |
handler | the callback handler function |
parameter | user provided parameter that is passed to the callback handler |
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.
self | endpoint instance to use |
handler | the callback function |
parameter | parameter that is passed to the callback function |
TASE2_API void Tase2_Endpoint_setConnectTimeout | ( | Tase2_Endpoint | self, |
int | timeoutInMs ) |
Sets the connect timeout of active endpoints.
Default value is 10000 ms.
self | endpoint instance to use |
timeoutInMs | timeout in milliseconds |
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.
the | ID string of the endpoint |
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.
self | endpoint instance to use |
vendor | the vendor name of the TASE.2 application |
model | the model name of the TASE.2 application |
revision | the revision string of the TASE.2 application |
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)
self | endpoint instance to use |
pSelector | presentation layer address |
sSelector | session layer address |
tSelector | ISO COTP layer address |
TASE2_API void Tase2_Endpoint_setLocalAeInvocationId | ( | Tase2_Endpoint | self, |
int | aeInvocationId ) |
Set local AE-invocation-ID.
self | endpoint instance to use |
aeInvocationId | the new AE-invocation-ID value |
TASE2_API void Tase2_Endpoint_setLocalAeQualifier | ( | Tase2_Endpoint | self, |
int | aeQualifier ) |
Set local AE-qualifier.
self | endpoint instance to use |
aeQualifier | the new AE-qualifier value |
TASE2_API void Tase2_Endpoint_setLocalApInvocationId | ( | Tase2_Endpoint | self, |
int | apInvocationId ) |
Set local AP-invocation-ID.
self | endpoint instance to use |
apInvocationId | the new AP-invocation-ID value |
TASE2_API void Tase2_Endpoint_setLocalApTitle | ( | Tase2_Endpoint | self, |
const char * | apTitle, | ||
int | aeQualifier ) |
Set the local AP-title value.
self | endpoint instance to use |
apTitle | the new AP-title value |
aeQualifier | the new AE-qualifier value |
TASE2_API void Tase2_Endpoint_setLocalApTitleEx | ( | Tase2_Endpoint | self, |
const char * | apTitle ) |
Set local AP-title.
self | endpoint instance to use |
apTitle | the new AP-title value |
TASE2_API void Tase2_Endpoint_setLocalIpAddress | ( | Tase2_Endpoint | self, |
const char * | ipAddress ) |
Sets the local IP address (only for passive mode)
self | endpoint instance to use |
ipAddress | local IP address to use. |
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).
self | endpoint instance to use |
tcpPort | local TCP port to use. |
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.
self | endpoint instance to use |
maxPduSize | the maximum PDU size in bytes |
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.
self | endpoint instance to use |
value | the maximum number of outstanding service calls |
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.
self | endpoint instance to use |
value | the maximum number of outstanding service calls |
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)
self | endpoint instance to use |
pSelector | presentation layer address |
sSelector | session layer address |
tSelector | ISO COTP layer address |
TASE2_API void Tase2_Endpoint_setRemoteAeInvocationId | ( | Tase2_Endpoint | self, |
int | aeInvocationId ) |
Set remote AE-invocation-ID (for active endpoint)
self | endpoint instance to use |
aeInvocationId | the new AE-invocation-ID value |
TASE2_API void Tase2_Endpoint_setRemoteAeQualifier | ( | Tase2_Endpoint | self, |
int | aeQualifier ) |
Set remote AE-qualifier (for active endpoint)
self | endpoint instance to use |
aeQualifier | the new AE-qualifier value |
TASE2_API void Tase2_Endpoint_setRemoteApInvocationId | ( | Tase2_Endpoint | self, |
int | apInvocationId ) |
Set remote AP-invocation-ID (for active endpoint)
self | endpoint instance to use |
apInvocationId | the new AP-invocation-ID value |
TASE2_API void Tase2_Endpoint_setRemoteApTitle | ( | Tase2_Endpoint | self, |
const char * | apTitle, | ||
int | aeQualifier ) |
Set remote AP-title and AE-qualifier (for active endpoint)
self | endpoint instance to use |
apTitle | the new AP-title value |
aeQualifier | the new AE-qualifier value |
TASE2_API void Tase2_Endpoint_setRemoteApTitleEx | ( | Tase2_Endpoint | self, |
const char * | apTitle ) |
Set remote AP-title (for active endpoint)
self | endpoint instance to use |
apTitle | the new AP-title value |
TASE2_API void Tase2_Endpoint_setRemoteIpAddress | ( | Tase2_Endpoint | self, |
const char * | ipAddress ) |
Sets the remote IP address (only for active mode)
self | endpoint instance to use |
ipAddress | remote IP address to use. |
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).
self | endpoint instance to use |
tcpPort | remote TCP port to use. |
TASE2_API void Tase2_Endpoint_setRequestTimeout | ( | Tase2_Endpoint | self, |
int | timeoutInMs ) |
Sets the timeout for confirmed request messages.
Default value is 5000 ms.
self | endpoint instance to use |
timeoutInMs | timeout in milliseconds |
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.
self | endpoint instance to use |
handler | the callback function |
parameter | parameter that is passed to the callback function |
TASE2_API void Tase2_Endpoint_setTLSConfiguration | ( | Tase2_Endpoint | self, |
TLSConfiguration | tlsConfig ) |
Set the TLS configuration.
New in version 2.1.0
self | endpoint instance to use |
tlsConfig | TLS configuration object, or null for not using TLS |
TASE2_API void Tase2_Endpoint_setWriteTimeout | ( | Tase2_Endpoint | self, |
int | timeoutInMs ) |
Sets the timeout for writing to TCP sockets.
Default value is 5000 ms.
self | endpoint instance to use |
timeoutInMs | timeout in milliseconds |
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.
state | the expected state (state to wait for) |
timeout | maximum time to wait for the expected state (in ms) |
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 const char * Tase2_Library_getVersionString | ( | ) |
Get the version string of the library (e.g. "1.2.3")
The format is MAJOR.MINOR.PATCH
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.
logFunction | user provided log handler or NULL |
TASE2_API void Tase2_Library_setLogFunctionEx | ( | Tase2_Log_FunctionEx | logFunction | ) |
TASE2_API void Tase2_Library_setLogLevel | ( | Tase2_LogLevel | level | ) |
Set the library log level.
NOTE: Default log level is TASE2_LOG_INFO
level | the log level to apply |