KX Sensors SAPI¶
This site provides guides and reference content for the KX Sensors Streaming API (SAPI).
These interfaces provide functionality to connect to KX Sensors servers in order to ingest and query data.
The supported languages are C, C#, and Java.
What's New in v3¶
Some notable differences introduced in SAPI for KX Sensors v3:
-
Delta Platform components removed — As on the server, client-side Delta Platform components have been removed.
-
Centralized implementation in C — The new SAPI centralizes logic (process discovery, connection management, routing, etc.) in a C SAPI.
C# SAPI and Java SAPI are relatively thin layers around the C implementation.
This also means that OS-specific binaries are included with C# and Java SAPI. -
Interface streamlined —
callAPIandcallFunctionhave been combined intoexecute. -
Networking changes — ACKs for synchronous publishes are now sent via UDP.
Additionally, SAPI clients now accept connections from the server, specifically Response Processes (RPs). -
No
subscribe()— There is currently no support forsubscribe; however,registerListenerprovides support for at-least-once delivery of notifications. -
No thrown exceptions — SAPI no longer throws exceptions.
Instead, methods consistently return a Boolean to signal success and populate a response object with: - application code (AC)
- response code (RC)
-
and other fields providing further detail.
Although this is not the norm for languages such as C# and Java, it simplifies error handling in the calling code and unifies the interface across managed and unmanaged languages. -
Discovery and RT integrated — Under the covers, SAPI utilizes the new Discovery service to retrieve connection information for remote processes and integrates Reliable Transport (RT) to reliably publish messages.
-
Native socket conditioning — A separate library called
netconwas previously used to enable setting of TCP socket options for fast failure detection.
Those socket options can now be set directly via SAPI configuration.