A WSN consists of a base station (gateway) that can
communicate with a number of wireless sensor nodes
via a radio link. Data are collected at the WSN nodes,
processed, and directly transmitted to the gateway
(single hop) or, if required, uses other nearby WSN
nodes (multi-hop) on the way to forward data to the
gateway, as shown in Figure 1