OW2 Consortium mobiot

Compare Revisions

Ignore whitespace Rev 2 → Rev 3

/trunk/PhoneServicesProxy/ReadMe.md
7,7 → 7,16
been issued towards them via the proxy, and in turn send replies to these requests in order for them to be forwarded to the respective clients.
 
#API
To be updated
Available methods:
1. Get all pending requests for a device: [GET] http://{proxyURL}/pendingrequests/{deviceID}
-> Responds with a JSON array
2. Request a value from a service on a specified device: [GET]: http://{proxyURL}/{deviceID}/{serviceName}
-> Responds with the response from the service
3. Posts a response to the proxy from the device: [POST] http://{proxyURL}/{deviceID}/{serviceName}
-> Includes in body the sensed values from the mobile device
4. Start the onboard Websocket server: [GET] http://{proxyURL}/startws
5. Stop the onboard Websocket server: [GET] http://{proxyURL}/stopws
6. Check the status of the onboard Websocket server: [GET] http://{proxyURL}/statusws
 
#Use
Deploy it on a Tomcat server.
/trunk/RegistryManager/ReadMe.md
8,8 → 8,133
Deploy on a tomcat server.
 
#API calls
To be updated
Available methods:
1. Get all devices around a point offering the specified service(s):
[GET] http://{registryURL}/rest/devices-around-point
?center_X={lat}
&center_Y={lon}
&range={range_in_meters}
&concept={concept}
-> Responds with a JSON array
 
2. Register a service for a specific device:
[POST]: http://{registryURL}/rest/register_service
?address={serviceAddress}
&device_id={deviceID}
&name={serviceName}
&type={serviceType}
&accuracy={serviceAccuracy}
&sensor{sensorType}
&range={sensorRange}
&unit={sensorReturningValueUnit}
&global_region={globalRegionName}
&concept={conceptName}
&coordinateX={lat}
&coordinateY={lon}
&dataType={returningDataType}
&expiry_date={expiryDate}
&estimated_path={estimatedCoveragePathArray}
 
3. Register a service for a specific device after deviding if it should be registered according to the result probabilistic mechanism:
[POST]: http://{registryURL}/rest/decide_and_register_service
?address={serviceAddress}
&device_id={deviceID}
&name={serviceName}
&type={serviceType}
&accuracy={serviceAccuracy}
&sensor{sensorType}
&range={sensorRange}
&unit={sensorReturningValueUnit}
&global_region={globalRegionName}
&concept={conceptName}
&coordinateX={lat}
&coordinateY={lon}
&dataType={returningDataType}
&expiry_date={expiryDate}
&estimated_path={estimatedCoveragePathArray}
&time_of_request={time}
&threshold={probabilityThreshold}
 
4. Remove a registered service for a specific device:
[POST]: http://{registryURL}/rest/remove_service
?address={serviceAddress}
 
5. Get number of services per concept on a specified device:
[GET] http://{registryURL}/rest/find_number_of_services
?device_id={deviceID}
&global_region={globalRegionName}
&concept={concept}
&bottom_left_point_of_interest_x={lat}
&bottom_left_point_of_interest_y={lon}
&upper_right_point_of_interest_x={lat}
&upper_right_point_of_interest_y={lon}
-> Responds with a JSON object containing an array of concepts and the respective number of services
 
6. Get number of services per concept on a specified device at a specified area:
[GET] http://{registryURL}/rest/find_number_of_services_in_area
?device_id={deviceID}
&global_region={globalRegionName}
&concept={concept}
-> Responds with a JSON object containing an array of concepts and the respective number of services
 
7. Execute a lookup query:
[GET] http://{registryURL}/rest/execute_lookup_query
?global_region={globalRegionName}
&concept={concept}
-> Responds with an array of the services found
 
8. Execute a lookup query around a point:
[GET] http://{registryURL}/rest/execute_lookup_query_around_point
?global_region={globalRegionName}
&point_of_interest_x={lat}
&point_of_interest_y={lon}
&distribution={distributionType}
&distance={distanceInMeters}
&size={subsetSize}
&time={time}
&concept={concept}
-> Responds with an array of the services found
 
9. Execute a lookup query in sub-region:
[GET] http://{registryURL}/rest/execute_lookup_query_in_subregion
?global_region={globalRegionName}
&bottom_left_point_of_interest_x={lat}
&bottom_left_point_of_interest_y={lon}
&upper_right_point_of_interest_x={lat}
&upper_right_point_of_interest_y={lon}
&concept={concept}
-> Responds with an array of the services found
 
10. Execute a lookup query in area:
[GET] http://{registryURL}/rest/execute_lookup_query_in_area
?global_region={globalRegionName}
&bottom_left_point_of_interest_x={lat}
&bottom_left_point_of_interest_y={lon}
&bottom_right_point_of_interest_x={lat}
&bottom_right_point_of_interest_y={lon}
&upper_left_point_of_interest_x={lat}
&upper_left_point_of_interest_y={lon}
&upper_right_point_of_interest_x={lat}
&upper_right_point_of_interest_y={lon}
&distribution={distributionType}
&subset_size={subsetSize}
&concept={concept}
-> Responds with an array of the services found
 
11. Updates the expiry date of a service:
[POST]: http://{registryURL}/rest/keep_service
?address={serviceAddress}
&expiry_date={expiryDate}
 
12. Remove all registered services:
[POST]: http://{registryURL}/rest/remove_all_services
 
13. Update the status of a specified device
[POST]: http://{registryURL}/rest/updatedevice
?device_id={deviceID}
&location_x={lat}
&location_y={lon}
 
#Dependencies
1. IotsCommonObjects <org.ow2.choreos.iots.IotsCommonObjects>
2. Sweep <org.ow2.choreos.iots.Sweep>
/trunk/SensorAccess/ReadMe.md
9,6 → 9,13
Deploy it on Android mobile devices (min sdk version: 19).
Use of AndroidStudio is recommended for easier built with gradle engine.
 
#API
Get sensor value¤â:
1. Get noise level: [GET] http://{deviceIP}/getnoiselevel
2. Get geo-location: [GET] http://{deviceIP}/getlocation
3. Get extended geo-location: [GET] http://{deviceIP}/getextendedlocation
4. Push message to device [POST] http://{deviceIP}//pushmessage (include text in the body of the message)
 
#Dependencies
1. Androjena <com.hp.hpl.jena> https://code.google.com/p/androjena/
2. JavaWebsocket <org.java_websocket> http://java-websocket.org/