call us: +31203311214
The Classic SDK is end-of life !
Consider using the new and improved PST SDK instead
The Classic SDK is considered to be a legacy SDK and is no longer actively supported. The PST SDK is the recommended way for integrating the PST into your own solution
Classic SDK
The Classic SDK offers real-time access to the tracking data produced by the PST. Offering a native C API as well as bindings for C# and Python, it acts as a middle-ware layer between the PST Client application and your own application. Having data gathering as its sole purpose, it has a simple and easy to use API that can quickly be implemented.
Connect through the PST Client
The Classic SDK offers a simple data-only communication protocol that operates through the PST Client application. This means that the PST Server and PST Client applications need to be running at all times.
Advanced control of the PST unit is not possible through the classic SDK and is only offered through the PST SDK
Because the PST SDK directly interfaces with the PST hardware, it offers the most direct and fastest interface to the PST.
#include <stdio.h>
#include "pstapi.h"
#include "windows.h"
int main(int ac, char** av)
{
int i, j, k;
struct PSTSensor sensor;
if (!pst_connect())
exit(1);
for(k = 0; k < 1000; ++k)
{
while(pst_get_sensor(&sensor))
{
printf("Pose for: %s\n", sensor.name);
for(i = 0; i < 4; ++i)
{
for(j = 0; j < 4; ++j)
{
printf("%.2f ", sensor.pose[i * 4 + j]);
}
printf("\n");
}
}
Sleep(10);
}
pst_disconnect();
return 0;
}
using System;
using PSTech;
class Client
{
unsafe static int Main(string[] args)
{
if (PSTAPI.pst_connect() == 0)
return 1;
PSTSensor sensor = new PSTSensor();
for(int k = 0; k < 1000; ++k)
{
while(PSTAPI.pst_get_sensor(ref sensor) != 0)
{
System.Console.WriteLine("Pose for: " + new String((sbyte*)sensor.name));
for(int i = 0; i < 4; ++i)
{
for(int j = 0; j < 4; ++j)
{
System.Console.Write(sensor.pose[i * 4 + j] + " ");
}
System.Console.WriteLine();
}
System.Console.WriteLine();
}
System.Threading.Thread.Sleep(10);
}
PSTAPI.pst_disconnect();
return 0;
}
}
import pstapi as pst
import time
def main():
sensor = pst.PSTSensor()
if not pst.pst_connect():
exit(1);
for k in range(1000):
while pst.pst_get_sensor(sensor):
print("Pose for: %s" % sensor.name);
for i in range(4):
for j in range(4):
print(sensor.pose[i * 4 + j], end="\t");
print();
time.sleep(0.01)
pst.pst_disconnect();
if __name__ == "__main__":
main()
Get the integration started
With only a small amount of code you can create an application that receives tracking data through the PST Client.
This example is a fully functional Classic SDK application that connects to the PST and prints tracking data to the command line.
SDK Documentation
The Classic SDK is simple and easy to use. For a more detailed description of the C API offered by the Classic SDK, please check out the Classic SDK documentation.
