## 4 Implementation and Testing Activities on MDTP
### Specific PDU Tests
#### 4.2.1 Test Case 1: Subscription to Periodic Environmental Data  
The middleware architecture wants to subscribe to periodic environmental information sent by a vehicle, so it publishes a PDU under the topic \"request_environment\" to request the vehicle the delivery of environment-related data every 10 s. Figure 6 shows the kind of data that were added to the fields that conform the PDU send to do the request.  
Figure 6: Appearance of the PDU used to request environment information.  
Since the vehicle is subscribed to the topic \"request_environment\", it processes the petition, takes the correspondent measurements and publishes every 10 s a state vector (under the topic \"report_environment\") with the corresponding data shown in Figure 7.  
The time that it takes for the DDS proxy located in the AUV to answer the requests from the publish-subscription manager of the middleware and send a state vector has been measured as varying between 3.56 and 5.58 s. It has also been verified that if 10 DDS proxy components are started in 10 different terminal windows (i.e., representing a swarm of 10 AUVs deployed underwater), the request sent by the publish-subscription manager reaches the 10 components almost simultaneously. The reliability of the protocol to work among the different parts of the components was tested by means of a series of tests where the PDUs where sent through all the software components used for their interaction. Figure 8 displays the results obtained when running 50 attempts at sending environmental data related to subscriptions.  
In this figure, it is shown how the period of time used to transfer data regarding subscriptions can be done in a reliable (there were no connection errors in the scenario that was used) and realistic manner. The data were transmitted at rates that are similar to the ones used in other solutions that  
Figure 8: Time measurements for periodic environmental data subscriptions.  
Figure 7: Appearance of the PDU used to send environment information.  
involve message transmission in middleware environments: for example, user experience with data transmission in Oracle Fusion Middleware is expected to be measured in seconds (\"For example, you might want to ensure that 90% of the users experience response times no greater than 5 s and the maximum response time for all users is 20 s\" [47]. Timeout and keep alive messages use time intervals of 300 and 5 s, respectively). JBoss Enterprise Application Platform uses 30 s intervals for timeout messages too [48]. Lastly, it is consistent with results that can be expected from Message-Oriented Middleware, where according to [PERSON], \"Online messaging is in real time, with message delivery typically occurring in seconds or even sub-seconds\" [49]. Overall, it can be said that this protocol that has been conceived for autonomous maritime vehicles shows a comparable performance with some other already established solutions. Nevertheless, MDTP has been explicitly conceived for transmission of maritime data using as little amount of bits as possible, unlike all the other solutions that make use of a reliable transmission medium.  
Table 6 shows that the performance of the system is satisfactory overall: clearly, the amount of time employed to deliver data from a subscription varies within acceptable ranges of time if the data transmission between vehicles is considered. Furthermore, the average and median values obtained from the 50 successful attempts to establish communications are very close one to the other; this implies that the outlier values have little weight in the measurements obtained, and therefore confirms that the protocol offers a predictable performance. This is reinforced by the comparatively reduced time difference between the minimum and maximum figures (minimum is slightly less than 64% of the maximum) that have been measured.