## 2 Related Work  
Many existing cross-layer protocols have been designed. However, they often ignore some important information such as context information, which can be relevant for network optimization. This section reviews a number of representative context-aware cross-layer designs in WSNs. The CIVIC protocol [5] adapts the routing mechanism to the power level of the sensor nodes and context information of a network. CIVIC exploits the _meta_ data context information from applications for the purposes of application data security and compression. By adapting its routing to the application level contexts, CIVIC can select paths based on different security and priority levels for efficient data transmissions. However, CIVIC does not specify how it structurally organizes the contexts, and this may limit its applicability. The energy-efficient Context Adaptive MAC (CA-MAC) protocol [6] for WSNs uses the node buffer states and the priority context of upper layer packets to amend the transmission schedule of a node by putting the node into the sleep mode whenever possible. CA-MAC only considers application level packet priority as a context, and may not behave well under a long burst of high priority packets. A hybrid TDMA/contention-based context-aware MAC protocol for wireless body area networks is proposed in [7]. The body sensor nodes dynamically adapt its mode of channel access, transmit duration, and sampling rate according to changing human body and environmental contexts. However, this MAC protocol is designed for a simple star topology network, which is not suitable for large-scale WSNs with complex topology and multi-hop communications. The context-aware cross-layer (CACL) broadcast scheduling scheme for ad hoc networks [8] uses context available locally in a node's MAC layer such as local node density, current state (idle, transmit, receive) and previous transmit duration, to schedule the broadcast of packets from the network routing layer in order to minimize broadcast collisions under heavy load conditions. This scheme does not use contexts that may be available from other layers or from sources that are external to the node. In the Context-Aware Clustering Hierarchy (CACH) routing protocol [9, 10], the WSN is clustered based on the detected environment contexts. A cluster is formed by a group of sensor nodes with their sensor readings in a similar range. However, as sensor readings can be non-uniform throughout the network, the cluster size may differ significantly between clusters, resulting in unbalanced traffic load and energy usage within the network. In [11], the Context-Aware Multi-path Selection algorithm (CAMS) selects the right number of paths from the available paths for multimedia communication in WSNs. The CAMS only consider the data value from sensors (representing brightness and noise levels) as context information. This can cause problems such as a difficulty in distinguishing between situations with identical data value in different scenarios. The Reactive Environmental Monitoring Aware Routing (EMA) [12] is an implementation of a generic framework for context aware routing in WSNs. The framework considers the node state, received signal strength, and hop count of a route as context criteria for making routing decisions. However, Reactive EMA only considers node and network level contexts, but not the context information encapsulated in the packets from the application. In [13], context information is utilized for QoS management in WSNs, where differentiated QoS guarantees can be provisioned to the communication of sensor data according to their spatial and temporal correlations. However, only the location and transmission rate of sensor nodes are considered as context information, which may limit the options available for managing QoS requirements in WSNs. A cross-layer architecture proposed in [14] supports network level context awareness in communications.