Commit 1bed25be authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Added handling of postamble PTC synchronization. Slave PTC to run postamble first

parent 07de7e37
......@@ -1186,18 +1186,24 @@ module OneM2M_Functions {
if (PX_RUN_POSTAMBLE) {
if(vc_config == e_cf02) {
if(vc_cse1.alive) {
f_cse_postamble_cse1();
}
}
if(vc_auxiliaryAe2Up) {
if (vc_ae2.alive) {
f_cse_postamble_aeSimu(vc_ae2);
}
}
if(vc_config == e_cf02) {
if(vc_cse1.running) {
vc_cse1.stop;
}
if(vc_cse1.alive) {
f_connectInfoPort(vc_cse1);
f_cse_postamble_cse1();
f_cse_defaultHandler_aeSimu();
f_disconnectInfoPort(vc_cse1);
}
}
for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) {
v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]);
......@@ -1370,7 +1376,11 @@ module OneM2M_Functions {
}
}
}
if(vc_config == e_cf02) {
if(infoPort.checkstate("Connected")) {
infoPort.send(SyncPoints:e_done);
}
}
}
}//end group postambleFunctions
......@@ -2381,6 +2391,25 @@ module OneM2M_Functions {
}// end f_cse_createResourceHandler
/**
* @desc Activate default for AeSimu
*/
function f_cse_defaultHandler_aeSimu() runs on AeSimu {
//Activate defaults when running on a PTC
f_cse_activateDefaults_ae();
tc_ac.start;
alt {
[] infoPort.receive(OneM2M_Types.SyncPoints:e_done) {
log(__SCOPE__, "Peer component done")
}
[] tc_ac.timeout {
}
}
}// end f_cse_defaultHandler_aeSimu
/**
* @desc Creation of a local resource
* @param p_resourceType Resource type of the resource to be created
......
......@@ -48,9 +48,9 @@ module OneM2M_Ports {
*/
type port InfoPort message {
in
RequestPrimitive, ResponsePrimitive, PrimitiveContent, MyResource, integer, XSD.ID;
RequestPrimitive, ResponsePrimitive, PrimitiveContent, MyResource, integer, XSD.ID, SyncPoints;
out
RequestPrimitive, ResponsePrimitive, PrimitiveContent, MyResource, integer, XSD.ID;
RequestPrimitive, ResponsePrimitive, PrimitiveContent, MyResource, integer, XSD.ID, SyncPoints;
}
......
......@@ -8755,6 +8755,11 @@ group InvalidTypes {
group OtherTypes {
type enumerated SyncPoints {
e_done (0),
e_error (1)
}
type enumerated Configurations {
e_cf01,
e_cf02,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment