Cortex Android
 All Classes Namespaces Functions Variables
nl.sense_os.cortex.GeoFenceSensor Class Reference
Inheritance diagram for nl.sense_os.cortex.GeoFenceSensor:

Public Member Functions

 GeoFenceSensor (String name, SensePlatform sensePlatform)
 
 GeoFenceSensor (SensePlatform sensePlatform)
 
void disable ()
 
AIM getAIM ()
 
void setGoalLocation (double latitude, double longitude)
 
void setRange (double range)
 
void resetOutOfRange ()
 

Detailed Description

The GeoFencing module calculates the distance from an incoming latitude, longitude point to a predefined latitude, longitude position in meters. If the distance is larger then a predefined range then this module will send an out of range message, it will also send a message when the position data comes in that lies within the range. This module will only send output data if there is a change in the value out/in range

This DataProcessor requires the following sensors/settings:
SensorNames.Location
Location sensing enabled

Author
Ted Schmidt ted@s.nosp@m.ense.nosp@m.-os.n.nosp@m.l

Copyright (c) 2013 Sense Observation Systems BV. All rights reserved.

Constructor & Destructor Documentation

nl.sense_os.cortex.GeoFenceSensor.GeoFenceSensor ( String  name,
SensePlatform  sensePlatform 
)

Geo-Fence constructor

A Geo-Fence data producer will be registered at the Sense Service
under the name supplied with this constructor.
To receive data from this DataProducer, subscription should be done at the Sense Service with the given name.
The DataProcessor persists its state based on the supplied name.
Re-creating a Geo-Fence DataProducer with the same name will load its previous settings.

Parameters
sensePlatformThe SensePlatform
nameThe name of the data processor. Should be unique.
nl.sense_os.cortex.GeoFenceSensor.GeoFenceSensor ( SensePlatform  sensePlatform)

Geo-Fence constructor

A Geo-Fence data producer will be registered at the Sense Service

See Also
GeoFenceSensor(String name, SensePlatform sensePlatform)
Parameters
sensePlatformThe SensePlatform

Member Function Documentation

void nl.sense_os.cortex.GeoFenceSensor.disable ( )

Disables the module

This method un-subscribes the module for the different sensor input streams. It also unregisters the module at the Sense service as DataProducer

AIM nl.sense_os.cortex.GeoFenceSensor.getAIM ( )

Get the AIM module

This method returns the GeoFence AIM object;

Returns
AIM geoFencing module
void nl.sense_os.cortex.GeoFenceSensor.resetOutOfRange ( )

Reset out of range

This function resets the out of range to 0

void nl.sense_os.cortex.GeoFenceSensor.setGoalLocation ( double  latitude,
double  longitude 
)

Set the goal location

The goal location is the GPS location from which the distance is measured based on the current location.

Parameters
latitudeThe position latitude
longitudeThe position longitude
void nl.sense_os.cortex.GeoFenceSensor.setRange ( double  range)

Set the range in meters

This method sets the range in meters. This range defines the fence measured from the goal position. If the distance exceeds the defined range a data point will be send

Parameters
rangeThe range in meters

The documentation for this class was generated from the following file: