... | ... | @@ -6,11 +6,11 @@ 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/88617a8b2c11556c54273ec922ae3208/humain-34_driver.png)
|
|
|
![humain-34_driver](/uploads/58d1ad69296866e937f1ef6cea286e64/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 AntennaInstructionHandler warns its listeners. |
|
|
\ No newline at end of file |
|
|
#### 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 |