3.5. IMPLEMENTATION 39
1. Register: is method is called during the startup of the WSN server. It does not take
any parameters as input but, it calls the web service of the middleware by passing latitude,
longitude, and IP address information to register this base station. We hard-coded the lat-
itude and longitude values for now as the sensors do not have location sensing capabilities.
IP address is dynamically accessed from the wired machine which hosts the server.
2. AddFrequency: is method accepts sampling frequency as input and responds back with
a TRUE or FALSE if sensor activation is successful or unsuccessful respectively. First, this
method detects all sensors that are connected to the WSN. en, it sets up the routing,
TDMA and aggregation protocols for the sensors that are present in the WSN. If all the
setup procedure is successful, it returns a TRUE value. It later sends out the sampling
frequency to all sensors nodes.
3. RemoveFrequency: is method, when invoked, sends out command to all the sensors to
stop sensing and go to sleep mode.
4. SetEffectiveSensorType: is method accepts the new sensing parameters that are to be
sensed by the sensors nodes. It then sends out this received sensing capabilities information
to all the sensors in the WSN. If the sensors are previously sensing, they would reset and
start sensing again. On the other hand, if the sensors are not sensing, they will start sensing
after they have received the sensing capability information. Once the sensors start sensing,
they are programmed to send data to the serial forwarder object which later forwards it to
WSN object.
5. GetData: is method accepts a request from the middleware and responds to this request
with the new sensed values. ese data values are obtained from the WSN object which
keeps updating itself whenever the sensor nodes transmit a new set of sensed data value.
3.5.4 DATA STREAMING FOR MULTI-USER ENVIRONMENT
e virtual sensor model can be used to effectively support a multi-user environment. A single
wireless sensor is used to provide data for multiple users, where the users may demand data at
varying frequency and of different phenomena. When the web application server in Figure 3.2
receives user requests, they are transferred to the virtual sensor server. e virtual sensor server
performs the mapping between the user’s virtual sensors and the physical sensors. If multiple
virtual sensors correspond to a physical sensor, the virtual sensor server combines the request by
combining the sampling duration, sampling frequency and the sensing phenomena. e com-
bined request is then forwarded to the appropriate service instance of the backend server. e
service instance communicates with the WSN and collects data. Data from each WSN is sam-
pled at the minimum frequency of all requests. is data is time-stamped with the local time and
stored in the database and displayed to the user at the requested frequency. Also, users can select
data from multiple base stations at a time, either by selecting location which includes multiple
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.2.122