## 3 System Framework Overview
### Physical Layer  
In the proposed system framework, the Internet of Things (IoT) is the enabling technology for efficient farm management to ensure maximum agricultural production of optimum quality and increase the profitability of various agricultural production schemes [86].  
Toward this framework, a WSAN is integrated in an agriculture facility, consisting of a group of self-powered sensor nodes deployed in a mesh network topology with adequate communication range to cover a wide area. These nodes incorporate sensors that remotely acquire real-time data about various features concerning the cultivation, as well as actuators that interact with them enabling the proper physical actions within the facility. Concerning the hardware design architecture of the WSAN, several solutions, especially addressing to the harsh operating environment of rural areas, are identified and reported in the literature as in [38; 39; 40].  
Integrating WSANs in agriculture facilities should meet several operation requirements that are applied and processed in parallel [29; 39; 40; 41; 42], as listed below:  
* Monitoring and/or control of environmental conditions such as temperature, humidity, pressure, wind, illuminance, etc.
* Monitoring and/or control of properties related to the crop and the soil such as temperature (i.e., leaf, root zone, nutrient solution), moisture, oxygen (O\({}_{2}\)), carbon dioxide (CO\({}_{2}\)), acidity (pH level) nutrient concentration (PPM, EC), etc.
* Forecast and control of imminent plant diseases and pests,
* Security surveillance and control of agriculture facilities.  
To handle such an extended demand in various information, a great number of heterogeneous sensor nodes is included in the WSAN. The schematic diagram of a typical agriculture sensor node deployed in the field is illustrated in Figure 4 while a brief indicative classification based on the properties of typical sensors applied to agricultural environments is given in Figure 5[76].  
The raw data acquired by the WSAN sensors are transmitted via a wireless/mobile gateway, providing the required translation technologies and mechanisms among various protocols, to the context-aware middleware cloud for being processed, managed, and stored as it will be thereafter described in this paper. Subsequently, a wireless/mobile gateway serves also the transmission of context-aware actions feedback to the actuator nodes of the WSAN in order to control the equipment of the PF facility (i.e., irrigation valves, fertilizing sprinklers, illuminance and heating/cooling systems, autonomous machinery, foggers/humidifiers, etc.) and perform the required agricultural applications.  
Figure 4: Schematic diagram of an agriculture wireless sensor deployed in the field.  
Concerning the WSAN communication options, comparison results deriving from literature [87; 88; 89; 90; 91], suggest that among the several protocols available for the IoT (i.e., WiFi, Bluetooth, 6 LowPAN, SigFox, Zigbee, etc.), the LoRaWAN and DASH7 wireless technologies are far more appropriate for the deployment of agricultural applications in rural areas, as they offer the optimum combination of communication range and data rate, as illustrated in Table 2.  
Whatever the specifications or the requirements of the system are in the physical layer, the proposed solution is generating a unique framework for context representation depending on the types of the devices, the available running services, and the complete setup of the system. For this purpose, each device has a unique identifier in the system so that it can be distinguished in the general cloud architecture.  
Figure 5: Indicative hierarchy of agriculture sensors classification based on properties. Sensors are classified by broadly dividing them into three classes based on their properties: (i) Physical (ii) Mechanical and (iii) Chemical. Further breakdown is given according to the type of measurement.