Adaptation to xsd_1_6_0

parent bd221859
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 23 2016-03-17 10:02:44Z reinaortega $
* $Id: OneM2M_Functions.ttcn 43 2016-04-13 12:16:12Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -52,7 +52,7 @@ module OneM2M_Functions {
var XSD.ID v_acpId;
v_acpId := f_createAccessControlPolicyAux("MyAcp", p_allowedOperations);
v_acpId := f_createAccessControlPolicyAux(p_allowedOperations);
mcaPort.send(m_request(m_createAeAux(p_name, {v_acpId})));
tc_ac.start;
......@@ -60,8 +60,8 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_responseOK) -> value v_response {
tc_ac.stop;
log("Preamble: Application registered successfuly");
if(ischosen(v_response.responsePrimitive_.content.any_1[0].AE)) {
vc_ae := v_response.responsePrimitive_.content.any_1[0].AE;
if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].AE)) {
vc_ae := v_response.responsePrimitive_.primitiveContent.any_1[0].AE;
}
}
[] mcaPort.receive(mw_responseKO) {
......@@ -157,19 +157,19 @@ module OneM2M_Functions {
group getSetFunctions {
function f_getCreateRequestPrimitive(in ResourceType p_resourceType, XSD.ID p_aeResourceAddress, in template (omit) XSD.String p_name, in template (omit) AccessControlOperations p_allowedOperations, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
function f_getCreateRequestPrimitive(in ResourceType p_resourceType, XSD.ID p_aeResourceAddress, in template (omit) AccessControlOperations p_allowedOperations, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
p_request.to_ := p_aeResourceAddress;
p_request.name := p_name;
//p_request.name := p_name;
if (p_resourceType == int1) {//AccessControlPolicy
if(isvalue(p_allowedOperations)){
p_request.content.any_1[0].ACP_create := valueof(m_contentCreateAcp (p_allowedOperations));
p_request.primitiveContent.any_1[0].ACP_create := valueof(m_contentCreateAcp (c_defaultResourceName, p_allowedOperations));
}
}
if (p_resourceType == int9) {//group
p_request.content.any_1[0].Group_create := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & vc_ae.resourceID}, omit);
p_request.primitiveContent.any_1[0].Group_create := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & vc_ae.resourceID}, omit);
}
if (p_resourceType == int15) {//pollingChannel
......@@ -179,10 +179,10 @@ module OneM2M_Functions {
return valueof(p_request);
}
function f_getUpdateRequestPrimitive(in ResourceType p_resourceType, XSD.ID p_resourceAddress, in template (omit) XSD.String p_name, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
function f_getUpdateRequestPrimitive(in ResourceType p_resourceType, XSD.ID p_resourceAddress, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
p_request.to_ := p_resourceAddress;
p_request.name := p_name;
//p_request.name := p_name;
if (p_resourceType == int3) {//Container
......@@ -223,12 +223,12 @@ module OneM2M_Functions {
group helpingFunctions {
function f_createResource(in ResourceType p_resourceType, XSD.ID p_parentResourceAddress, XSD.String p_resourceName, template RequestPrimitive p_requestPrimitive) runs on M2M {
function f_createResource(in ResourceType p_resourceType, XSD.ID p_parentResourceAddress, template RequestPrimitive p_requestPrimitive) runs on M2M {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
v_request := f_getCreateRequestPrimitive(p_resourceType,p_parentResourceAddress,p_resourceName, omit, p_requestPrimitive);
v_request := f_getCreateRequestPrimitive(p_resourceType,p_parentResourceAddress, omit, p_requestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
......@@ -252,19 +252,19 @@ module OneM2M_Functions {
}
function f_createAccessControlPolicyAux(XSD.String p_resourceName, in template (value) AccessControlOperations p_allowedOperations) runs on M2M return XSD.ID{
function f_createAccessControlPolicyAux(in template (value) AccessControlOperations p_allowedOperations) runs on M2M return XSD.ID{
var M2MResponsePrimitive v_response;
var XSD.ID v_acpId;
mcaPort.send(m_request(m_createAcpAux(p_resourceName,p_allowedOperations)));
mcaPort.send(m_request(m_createAcpAux(p_allowedOperations)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_responseOK) -> value v_response {
tc_ac.stop;
setverdict(pass, "f_createAccessControlPolicy: Resource type " & int2str(1) & " created successfuly");
v_acpId := f_getResourceId(v_response.responsePrimitive_.content);
return v_acpId;//TODO: Retrieve resourceId from v_response.responsePrimitive_.content_.any_1.accessControlPolicy.resourceID;
v_acpId := f_getResourceId(v_response.responsePrimitive_.primitiveContent);
return v_acpId;
}
[] mcaPort.receive(mw_responseKO) {
tc_ac.stop;
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 23 2016-03-17 10:02:44Z reinaortega $
* $Id: OneM2M_Pixits.ttcn 39 2016-04-08 12:34:02Z berge $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -35,4 +35,8 @@ module OneM2M_Pixits {
modulepar boolean PX_RUN_POSTAMBLE := true;
modulepar charstring PX_SERIALIZATION := "XML";
modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
} // end of module
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TypesAndValues.ttcn $
* $Id: OneM2M_TypesAndValues.ttcn 20 2016-03-16 10:34:05Z reinaortega $
* $Id: OneM2M_TypesAndValues.ttcn 43 2016-04-13 12:16:12Z reinaortega $
* @desc Module containing types and values for oneM2M
*
*/
......@@ -19,6 +19,7 @@ module OneM2M_TypesAndValues {
/* Constants */
const charstring c_uri_cse := "/~/in-cse/";
const charstring c_cse_name := "in-cse";
const XSD.String c_defaultResourceName;
//AccessControlOperations
const XSD.Integer c_C := 1;
......
File mode changed from 100755 to 100644
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