|
|
@ -25,16 +25,12 @@ var deviceModule = require("/modules/device.js");
|
|
|
|
|
|
|
|
|
|
|
|
if (uri != null) {
|
|
|
|
if (uri != null) {
|
|
|
|
var uriMatcher = new URIMatcher(callPath);
|
|
|
|
var uriMatcher = new URIMatcher(callPath);
|
|
|
|
//log.info(callPath);
|
|
|
|
|
|
|
|
log.info(uriMatcher.match("operation/{type}/{deviceid}/{operation}"));
|
|
|
|
|
|
|
|
if (uriMatcher.match("operation/{type}/{deviceid}/{operation}")) {
|
|
|
|
if (uriMatcher.match("operation/{type}/{deviceid}/{operation}")) {
|
|
|
|
|
|
|
|
|
|
|
|
var deviceId = uriMatcher.elements().deviceid;
|
|
|
|
var deviceId = uriMatcher.elements().deviceid;
|
|
|
|
var type = uriMatcher.elements().type;
|
|
|
|
var type = uriMatcher.elements().type;
|
|
|
|
var operation = uriMatcher.elements().operation;
|
|
|
|
var operation = uriMatcher.elements().operation;
|
|
|
|
var result = deviceModule.performOperation(deviceId, operation,[],type);
|
|
|
|
var result = deviceModule.performOperation(deviceId, operation,[],type);
|
|
|
|
<!--log.info(result);-->
|
|
|
|
|
|
|
|
<!--print(result);-->
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
%>
|