... | ... | @@ -6,11 +6,20 @@ This describes the Antenna 34 driver project. This project evolved from the driv |
|
|
|
|
|
The images underneath is the class diagram of the antenna 34. It started from the design of the antenna 6m and will evolve in the design for the antenna 34m and suited for the development in python.
|
|
|
|
|
|
![humain-34_driver](/uploads/58d1ad69296866e937f1ef6cea286e64/humain-34_driver.png)
|
|
|
![humain-34_driver](/uploads/d5e09def2c7d876de78cea95fb5278e5/humain-34_driver.png)
|
|
|
|
|
|
### Receiving messages from the server
|
|
|
|
|
|
The server sends coordinates in the form of a ServerAntennaCommunicationMessage. After initialisation and starting all the threads of the driver as a last step the Humain34mDriverApp creates a server socket that listens to the incoming messages of the driver. Once a message is received a new thread is started with the AntennaMessageReceiverRunner as runnable. This runnable will read the message from the socket, parse the message, request the correct AntennaMessageHandler from the AntennaMessageHandlerFactory and passes the message to the handler. The AntennaMessageHandler returns a AntennaMessageHandlerStream that can be used to return a message to the server over the same socket. If this is done, the socket is closed. At the moment there are two different messages being send by the server: antenna instructions and the antenna stop message.
|
|
|
|
|
|
#### Handling antenna instructions
|
|
|
The AntennaMessageHandlerFactory needs a handler to handle the antenna instructions. In this case the AntennaInstructionHandler is responsible for handling the antenna instructions. The AntenneInstructionHandler implements the AntennaMessageHandler interface and is added to the AntennaMessageHandlerFactory by the Humain34mDriverApp. The AntennaInstructionHandler will convert the coordinates in useful coordinates for the driver. The coordinates are offered to the InstructionHandlerDBService. The InstructionDistributor is warned that new instructions were added to the InstructionHandlerDBService. |
|
|
\ No newline at end of file |
|
|
The AntennaMessageHandlerFactory needs a handler to handle the antenna instructions. In this case the AntennaInstructionHandler is responsible for handling the antenna instructions. The AntenneInstructionHandler implements the AntennaMessageHandler interface and is added to the AntennaMessageHandlerFactory by the Humain34mDriverApp. The AntennaInstructionHandler will convert the coordinates in useful coordinates for the driver. The coordinates are offered to the InstructionHandlerDBService.
|
|
|
|
|
|
There are two types of coordinates that can be send by the server: parking coordinates and pointing coordinates. before the coordinates are stored, they are filtered. If a parking coordinate is not inside the bounds of the antenna, the coordinates are clipped to the nearest bound. Pointing coordinates that are outside the bounds of the antenna are remove from the list with coordinates. The coordinates that are still in the database and have the same time coverage are overruled. This means that a flag in the database is set. After these operations the coordinates are stored in the database.
|
|
|
|
|
|
Once the coordinates are in the database the InstructionDistributor is warned that new instructions were added to the InstructionHandlerDBService.
|
|
|
|
|
|
|
|
|
#### Handling stop messages
|
|
|
|
|
|
The AntennaMessageHandlerFactory needs a handler to handle the antenna stop instructions. In this case the AntennaStopHandler is responsible for flagging the coordinates for a particular scenario and subscenario. The AntennaStopHandler implemented the AntennaMessageHandler interface and is added to the AntennaMessageHandlerFactory by the Humain34mDriverApp. The AntennaStopHandler will instruct the InstructionHandlerDBService to stop a scenario. As a result the InstructionHandlerDBService will flag the coordinates belonging to the scenario and subscenario as stopped. |
|
|
\ No newline at end of file |