# Incremental Construction for Scalable Component-Based Systems
## 5 System Construction in EX-MAN
### Weather Information System  
A weather information system case study from [7] is linked with many remotely located weather stations. A weather station has a system linked with a number of sensors and devices to read different values from the weather. These values are collected through the sensors automatically and a number of times in a day. The central weather information system collects the data from these weather stations through a satellite communication link. In this section, using our approach, we construct a system for weather information system to get data from two remote weather stations. First of all, using EX-MAN, we prepared a repository of nine basic components (ground temperature (GT), air temperature (AT), air pressure (AP), wind speed (WiSp), rain fall (RF), wind direction (WD), humidity (HM), store data (DS) and component (SC)) required for the construction of considered case study. A component to read the ground temperature (GT) is created. This component is capable to compute minimum, maximum and average temperature values from the collected data from any specific period. Similarly, in the repository, another component to read the air temperature (AT) is created; this component provides minimum, maximum and average temperature values form the collected data form any specific period. Another component to compute the minimum, maximum and average values for the air pressure (AP) is created. For measuring the minimum, maximum and average values for the wind speed (WiSp) is created. A component to measure rain fall (RF) and a component to get the wind direction (WD) are created. To measure minimum, maximum and average values for humidity (HM) is created. A component to store data (DS) is created to save data from components connected to sensors. Lastly, a component (SC) is created to establish the satellite link with the remote weather station. In order to create the desired system by using our approach, we constructed a composite component linked weather station (LWS) for the linked weather station. For this purpose, the nine basic components created are used to construct the composite LWS in eight steps from \(S_{0}\) to \(S_{7}\), as shown in Figure 28. In the construction step, from the repository components, component instances are created for composite construction. In the first step, two component instances GT1 and AT1 are composed with a PIPE instance PIPE1; this composite is referred to as partial system \(S_{0}\). In the second iteration, \(S_{0}\) is incremented by an instance of AP1; this composite is referred to as partial system \(S_{1}\). Next, \(S_{1}\) is incremented with component WiSpi to create \(S_{2}\). In the next incremental step, partial system \(S_{2}\) is incremented with component RF1 to create partial system \(S_{3}\). Similarly, for the next step, partial system \(S_{3}\) is incremented with component WD1 to produce partial system \(S_{4}\) and \(S_{4}\) is incremented with the component HM1 for the creation of partial system \(S_{5}\). Next, partial system \(S_{5}\) is incremented with DS1 component to create partial system \(S_{6}\). In the last incremental step, partial system \(S_{6}\) is incremented with a component SC1 and two connectors PIPE2 and guard G1 to create composite component \(S_{7}\). This component is saved in the repository as component LWS. Figure 28: Construction of linked weather station (LWS) composite component. Next, we have constructed a prototype for a weather information system linked with two remote wilderness weather stations (shown in Figure 29). For this construction, in the first step, an instance of composite component (shown in Figure 28) LWS1 is created and is composed with another instance of the same composite component LWS2 by using a sequencer connector instance SEQ1. In order to get the data from these two linked weather stations, a request will be made through the SEQ1 connector and a response containing the data from both weather stations will be generated by SEQ1.