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;
......
/*******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
//
// File: UsefulTtcn3Types.ttcn
// Description:
// References:
// Rev:
// Prodnr:
// Updated:
// Contact: http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
module UsefulTtcn3Types {
type integer byte (-128 .. 127) with { variant "/* 8 bit */" };
type integer unsignedbyte (0 .. 255) with { variant "/*unsigned 8 bit*/" };
type integer short (-32768 .. 32767) with { variant "/*16 bit*/" };
type integer unsignedshort (0 .. 65535) with { variant "/*unsigned 16 bit*/" };
type integer long (-2147483648 .. 2147483647) with { variant "/*32 bit*/" };
type integer unsignedlong (0 .. 4294967295) with { variant "/*unsigned 32 bit*/" };
type integer longlong /* ( -9223372036854775808 .. 9223372036854775807 ) */ with { variant "/*64 bit*/" };
type integer unsignedlonglong /* ( 0 .. 18446744073709551615 ) */ with { variant "/*unsigned 64 bit*/" };
type float IEEE754float with { variant "/*IEEE754 float*/" };
type float IEEE754double with { variant "/*IEEE754 double*/" };
type float IEEE754extfloat with { variant "/*IEEE754 extended float*/" };
type float IEEE754extdouble with { variant "/*IEEE754 extended double*/" };
type universal charstring utf8string with { variant "/*UTF-8*/" };
type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) with { variant "/*UCS-2*/" };
type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) with { variant "/*UTF-16*/" };
type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) with { variant "/*8 bit*/" };
type record IDLfixed
{
unsignedshort digits,
short scale,
charstring value_
}
with {
variant "/*IDL:fixed FORMAL/01-12-01 v.2.6*/";
};
/*
type charstring char length (1);
NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal
charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as
identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility
with previous versions of the TTCN-3 standard. (except Titan doesn't)
NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding
for its values. Also, other properties of the base type can be changed by using attribute mechanisms.
*/
type universal charstring uchar length (1);
/*
NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given
encoding for its values. Also, other properties of the base type can be changed by using attribute
mechanisms.
*/
type bitstring bit length (1);
type hexstring hex length (1);
type octetstring octet length (1);
}
with {
encode "XML";
}
/*******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
//
// File: UsefulTtcn3Types.ttcn
// Description:
// References:
// Rev:
// Prodnr:
// Updated:
// Contact: http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
module UsefulTtcn3Types {
type integer byte (-128 .. 127) with { variant "/* 8 bit */" };
type integer unsignedbyte (0 .. 255) with { variant "/*unsigned 8 bit*/" };
type integer short (-32768 .. 32767) with { variant "/*16 bit*/" };
type integer unsignedshort (0 .. 65535) with { variant "/*unsigned 16 bit*/" };
type integer long (-2147483648 .. 2147483647) with { variant "/*32 bit*/" };
type integer unsignedlong (0 .. 4294967295) with { variant "/*unsigned 32 bit*/" };
type integer longlong /* ( -9223372036854775808 .. 9223372036854775807 ) */ with { variant "/*64 bit*/" };
type integer unsignedlonglong /* ( 0 .. 18446744073709551615 ) */ with { variant "/*unsigned 64 bit*/" };
type float IEEE754float with { variant "/*IEEE754 float*/" };
type float IEEE754double with { variant "/*IEEE754 double*/" };
type float IEEE754extfloat with { variant "/*IEEE754 extended float*/" };
type float IEEE754extdouble with { variant "/*IEEE754 extended double*/" };
type universal charstring utf8string with { variant "/*UTF-8*/" };
type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) with { variant "/*UCS-2*/" };
type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) with { variant "/*UTF-16*/" };
type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) with { variant "/*8 bit*/" };
type record IDLfixed
{
unsignedshort digits,
short scale,
charstring value_
}
with {
variant "/*IDL:fixed FORMAL/01-12-01 v.2.6*/";
};
/*
type charstring char length (1);
NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal
charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as
identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility
with previous versions of the TTCN-3 standard. (except Titan doesn't)
NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding
for its values. Also, other properties of the base type can be changed by using attribute mechanisms.
*/
type universal charstring uchar length (1);
/*
NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given
encoding for its values. Also, other properties of the base type can be changed by using attribute
mechanisms.
*/
type bitstring bit length (1);
type hexstring hex length (1);
type octetstring octet length (1);
}
with {
encode "XML";
}
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