## 4 Enhanced Objective Function for Routing in Agricultural Low-Power and Lossy Network
### Scalable Context-Aware Objective Function with Composite Routing Metrics
#### 4.2.2 Designing Combinable Energy-Aware and Resource-Aware Routing Metrics
* The availability information is another resource which represents particular RPAL DODAG paths associated with the application data of interest (_i.e._, sensing environmental data or event detection) requested by the precision agriculture monitoring application. Namely, this metric can hold the features in a routing path, particularly the role that can mark important retrievable resource information. In addition, as most of A-LLNs nodes have similar environmental sensing mission workloads, the RDC value is the most influential factor of the affordable workload metric and it will only be taken into account when the DODAG meets routing oscillations, and also when the weight value change between two ETX and RE composite routing metrics is bigger than a threshold. In A-LLNs, restarting is a common operation when the system meets a fault or exception at the software or hardware level. A specific component like NanoRisc [71] is able to provide counter information with a defined sampling frequency. Link color routing metric is an efficient metric to disseminate the link quality information. In particular, we note that research about this metric was quite scarce before the drafting of this article. As the ETX metric has been adopted as a link quality indicator, the link color metric container can give three new defined routing metrics a piggyback. In Figure 3, the format of this container using a cumulative color counter is depicted, and the utilization of each Link Color flag field is depicted in Table 4.  
Two counters are designated to record the number of the nodes which are too busy and too vulnerable. Additionally, the \"I\" flag of link color 3 could also determine whether to exclude the links with a specified color. Namely, the nodes, which have important monitoring missions or should respond to the \begin{table}
\begin{tabular}{c c c} \hline \hline
**Link Color** & **Carried Data** & **Utilization** \\ \hline Link color 1 + & \multirow{2}{*}{Affordable workload} & If the targeted node is battery powered, the 4-bit of _link color 1_ flags will be used to represent the RDC level of this node. Setting low-order bit means RF workload is low and setting high bit for high RDC level. \\  & & _Counter 1_ is used for counting the number of nodes that are too busy in this path. \\ \hline Link color 2 + & \multirow{2}{*}{Hardware robustness} & The 4-bit of _link color 2_ flags are used to present the four robustness level of the targeted node. If the restart count is low, the low-order bit will be set. If the node fails frequently in a period, the high bit will be set. \\  & & _Counter 2_ records the number of nodes which are fragile in this optional path. \\ \hline Link color 3 + & \multirow{2}{*}{Availability} & The 4-bit of _link color 3_ flags are used to present four availability information resource (sensing capability) levels. Namely, if this level is high, this targeted node has more monitored info to forward and even need to respond to the queries from sink node. \\ \cline{3-3} I flag & & information resource \(If\)_flag_ is set when that links with the specified color must be included. When cleared, it means this color must be excluded. \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Utilization and explanation of the three link color elements. Figure 3: Link color metric and its piggyback format. queries in a short time, are able to avoid being as routers or joining a long inefficient routing path. These three link colors present the conditions of A-LLN node in an optional link path so that some dangerous path can be pruned. Essentially, Link Color is used as a heterogeneous constraint rather than a scalar metric like ETX and RE. To sum up, the purpose of the composite routing metric is to introduce context awareness in the RPAL DODAG construction with 17 bytes more overhead in DIO messages.