Skip to content
Snippets Groups Projects

Stf531 time series

Merged Miguel Angel Reina Ortega requested to merge STF531-timeSeries into master
+ 905
15
Compare changes
  • Side-by-side
  • Inline
Files
@@ -1269,6 +1269,13 @@ module OneM2M_Functions {
@@ -1269,6 +1269,13 @@ module OneM2M_Functions {
log(__SCOPE__ & ":INFO: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.group_.resourceName)
log(__SCOPE__ & ":INFO: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.group_.resourceName)
}
}
}
}
 
case (int29) {
 
if (isvalue(p_response.primitiveContent.timeSeries) and
 
not(ispresent(p_response.primitiveContent.timeSeries.resourceName))) {
 
p_response.primitiveContent.timeSeries.resourceName := p_request.primitiveContent.timeSeries.resourceName;
 
log(__SCOPE__ & ":INFO: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.timeSeries.resourceName)
 
}
 
}
case else {
case else {
log(__SCOPE__&":WARNING: Resource Type "&int2str(enum2int(p_resourceType))&" not implemented");
log(__SCOPE__&":WARNING: Resource Type "&int2str(enum2int(p_resourceType))&" not implemented");
}
}
@@ -1334,6 +1341,32 @@ module OneM2M_Functions {
@@ -1334,6 +1341,32 @@ module OneM2M_Functions {
}
}
 
function f_cse_generateMissingDataPoint(in integer p_timeSeriesResourceIndex) runs on AeSimu{
 
 
var RequestPrimitive v_request;
 
var integer v_resourceIndex := -1;
 
var integer i;
 
var XSD.NonNegativeInteger v_periodicInterval := vc_resourcesList[p_timeSeriesResourceIndex].resource.timeSeries.periodicInterval;
 
var XSD.NonNegativeInteger v_missingDataDetectTimer := vc_resourcesList[p_timeSeriesResourceIndex].resource.timeSeries.missingDataDetectTimer;
 
timer t_noAction;
 
 
//Activate defaults when running on a PTC
 
f_cse_activateDefaults_ae();
 
i := 0;
 
while (i < 3) {
 
v_request := f_getCreateRequestPrimitive(int30, m_createTimeSeriesInstanceBase, p_timeSeriesResourceIndex);
 
v_request.primitiveContent.timeSeriesInstance.resourceName := "MyTimeSeriesInstance" & int2str(i);
 
 
v_resourceIndex := f_cse_createResource(int30, v_request, p_timeSeriesResourceIndex);
 
i := i + 1;
 
t_noAction.start(int2float(v_periodicInterval));
 
}
 
 
//After missingDataTimerDetect, a missing data point should have been detected
 
t_noAction.start(int2float(v_missingDataDetectTimer));
 
 
}
 
}//end group AeSimu
}//end group AeSimu
group CseSimuFunctions {
group CseSimuFunctions {
@@ -1637,6 +1670,15 @@ module OneM2M_Functions {
@@ -1637,6 +1670,15 @@ module OneM2M_Functions {
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container, p_primitiveContent.container)
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container, p_primitiveContent.container)
}
}
}
}
 
 
if (ischosen(p_primitiveContent.timeSeries)){
 
if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries)) {
 
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries, p_primitiveContent.timeSeries)
 
}
 
else if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.timeSeries)) {
 
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.timeSeries, p_primitiveContent.timeSeries)
 
}
 
}
return v_matchResult;
return v_matchResult;
Loading