1.2. Architecture¶
The API is designed in a way that the turret functions as a server and a client for different purposes. The server accepts requests for actions which it then tries to execute on the turret, while the client is responsible for sending out notifications about the changes induced either by the user or through the requests sent through the API.
1.2.1. Turret as Server¶
If the Thrift API is enabled for the client in the System Manager, the turret starts a Thrift Server and accepts connections and requests on port 9007.
Thrift generates the required class which realizes the TurretApi.TurretRequestService interface to send the requests to the server.
1.2.2. Turret as Client¶
You can request the turret for notifications of the different events that happen.
For this you first have to connect to the turret, and TurretApi.TurretRequestService.requestNotifications supplying it with the address of your server.
Your server will need to implement the TurretApi.TurretNotificationService interface.