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

Clean-up - Removing of unused variables and imports + some compilation errors


Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent f16a8e0e
......@@ -7,13 +7,12 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 339 2017-08-04 09:24:02Z reinaortega $
* $Id: OneM2M_Functions.ttcn 340 2017-08-07 12:08:41Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
module OneM2M_Functions {
import from LibCommon_Time {modulepar all;}
import from XSD all;
import from OneM2M_Templates all;
import from OneM2M_Types all;//{type XSD.ID};
......@@ -369,7 +368,7 @@ module OneM2M_Functions {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
log(__SCOPE__&" INFO: Resource" & v_request.to_ & " deleted");
log(__SCOPE__&" INFO: Resource " & v_request.to_ & " deleted");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
......@@ -597,7 +596,6 @@ module OneM2M_Functions {
* @verdict
*/
function f_cse_deleteResource(in RequestPrimitive p_requestPrimitive) runs on CseTester {
var MsgIn v_response;
mcaPort.send(m_request(p_requestPrimitive));
......@@ -627,13 +625,11 @@ module OneM2M_Functions {
*/
function f_isResourcePresent (integer p_resourceIndex) runs on CseTester return boolean {
var ResponseStatusCode v_responseStatusCode;
//Check to see if the resource is present or not
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource present: " & f_getResourceAddress(p_resourceIndex));
return true;
......@@ -659,9 +655,7 @@ module OneM2M_Functions {
*/
function f_isResourceNotPresent (integer p_parentIndex, XSD.String p_resourceName) runs on CseTester return boolean {
var ResponseStatusCode v_responseStatusCode;
log(testcasename() & "Hierarchical method is required to check the non presence of the resource");
log(testcasename() & ":INFO: Hierarchical method is required to check the non presence of the resource");
vc_addressingMethod := e_hierarchical;
//Check to see if the resource has NOT been created
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_parentIndex) & "/" & p_resourceName, f_getOriginator(p_parentIndex))));
......@@ -893,7 +887,7 @@ module OneM2M_Functions {
tc_ac.start;
alt {
[] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_request {
[] mcaPort.receive(mw_request(mw_notify(valueof(v_notificationRequest)))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Notification received");
v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier;
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 339 2017-08-04 09:24:02Z reinaortega $
* $Id: OneM2M_Templates.ttcn 340 2017-08-07 12:08:41Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -15,7 +15,6 @@ module OneM2M_Templates {
import from XSD all;
import from OneM2M_Types all;
import from OneM2M_TestSystem all;
import from OneM2M_TypesAndValues all;
//import from OneM2M_AdditionalTypes all;
import from OneM2M_Pixits all;
......@@ -399,7 +398,7 @@ module OneM2M_Templates {
primitiveContent:= {subscription := m_contentUpdateSubscription}
};
template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod) modifies m_update := {
template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod) modifies m_update := {
to_ := p_locResourceAddress,
requestIdentifier := "m_updateLocationPolicy",
primitiveContent := {locationPolicy := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod)}
......@@ -902,7 +901,7 @@ module OneM2M_Templates {
primitiveContent := {locationPolicy := m_contentCreateLocationPolicyBase}
};
template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod, in template (omit) NodeID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) modifies m_create := {
template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) ListOfDuration p_locationUpdatePeriod, in template (omit) NodeID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) modifies m_create := {
requestIdentifier := testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it
resourceType := int10,
......@@ -936,7 +935,7 @@ module OneM2M_Templates {
/**
* @desc Reception template for SemanticDescriptor creation
*/
template RequestPrimitive mw_createSemanticDescriptor(template XSD.ID p_from := *, template XSD.ID p_to := ?, template SemanticDescriptor_optional p_semanticDescriptor := mw_contentCreateSemanticDescriptor) modifies mw_create := {
template RequestPrimitive mw_createSemanticDescriptor(template XSD.ID p_from := *, template XSD.ID p_to := ?, template (present) SemanticDescriptor_optional p_semanticDescriptor := mw_contentCreateSemanticDescriptor) modifies mw_create := {
resourceType := int24,
primitiveContent := {semanticDescriptor := p_semanticDescriptor}
};
......@@ -1065,7 +1064,7 @@ module OneM2M_Templates {
* @desc Base NOTIFY request primitive
*/
template RequestPrimitive mw_notify(in template Notification p_notification) modifies mw_notifyBase := {
template RequestPrimitive mw_notify(in template (present) Notification p_notification) modifies mw_notifyBase := {
primitiveContent := {notification := p_notification}
};
......@@ -1307,7 +1306,7 @@ module OneM2M_Templates {
* @param p_accessControlPolicyIds ACP IDs for the Group
* @param p_name Resource name
*/
template (value) Group_optional m_contentCreateGroup ( in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
template (value) Group_optional m_contentCreateGroup ( in template (value) XSD.PositiveInteger p_maxNrOfMembers,
in template (value) ListOfURIs p_memberIds,
in template (omit) AcpType p_accessControlPolicyIds,
in template (omit) MemberType p_memberType := omit,
......@@ -1765,7 +1764,7 @@ module OneM2M_Templates {
choice := omit //NA
};
template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod, in template (value) NodeID p_locationTargetID, in template (value) XSD.AnyURI p_locationServerAddress) := {
template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) ListOfDuration p_locationUpdatePeriod, in template (omit) NodeID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) := {
resourceName := c_defaultLocationPolicyResourceName, //O
resourceType := omit, //NP
resourceID := omit, //NP
......@@ -1779,7 +1778,7 @@ module OneM2M_Templates {
announceTo := omit, //O
announcedAttribute := omit, //O
locationSource := p_locationSource, //M
locationUpdatePeriod := {p_locationUpdatePeriod}, //O
locationUpdatePeriod := p_locationUpdatePeriod, //O
locationTargetID := p_locationTargetID, //O
locationServer := p_locationServerAddress,//O
locationContainerID := omit, //NP
......@@ -3233,7 +3232,7 @@ module OneM2M_Templates {
}
template Notification mw_contentNotification (in template Representation p_representation) modifies mw_contentNotificationBase := {
template Notification mw_contentNotification (in template (present) Representation p_representation) modifies mw_contentNotificationBase := {
notificationEvent := {
representation := p_representation,
operationMonitor := *,
......@@ -3396,7 +3395,7 @@ module OneM2M_Templates {
* @param p_statusCode Status code
* @param p_requestId Request ID of the corresponding request
*/
template (value) ResponsePrimitive m_responsePrimitive(in template (value) ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (omit) PrimitiveContent p_content := omit) := {
template (value) ResponsePrimitive m_responsePrimitive(in ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (omit) PrimitiveContent p_content := omit) := {
responseStatusCode := p_statusCode,
requestIdentifier := p_requestId,
primitiveContent := p_content,
......@@ -3416,11 +3415,11 @@ module OneM2M_Templates {
* @param p_statusCode Status code
* @param p_requestId Request ID of the corresponding request
*/
template (value) ResponsePrimitive m_responsePrimitive_content(in template (value) ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (value) PrimitiveContent p_content) modifies m_responsePrimitive := {
template (value) ResponsePrimitive m_responsePrimitive_content(in ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (value) PrimitiveContent p_content) modifies m_responsePrimitive := {
primitiveContent := p_content
}
template ResponsePrimitive mw_responsePrimitive(in template ResponseStatusCode p_statusCode, in template PrimitiveContent p_content := *) := {
template ResponsePrimitive mw_responsePrimitive(in template (present) ResponseStatusCode p_statusCode, in template PrimitiveContent p_content := *) := {
responseStatusCode := p_statusCode,
requestIdentifier := ?,
primitiveContent := p_content,
......
......@@ -7,15 +7,14 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TestSystem.ttcn $
* $Id: OneM2M_TestSystem.ttcn 306 2017-06-20 16:19:04Z reinaortega $
* $Id: OneM2M_TestSystem.ttcn 340 2017-08-07 12:08:41Z reinaortega $
* @desc Test System module for oneM2M
*
*/
module OneM2M_TestSystem {
import from OneM2M_Types all;
import from OneM2M_TypesAndValues all;
import from LibCommon_Time {modulepar all};
import from LibCommon_Time all;
import from OneM2M_Ports all;
import from OneM2M_Pixits all;
......
......@@ -7,14 +7,13 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $
* $Id: OneM2M_TypesAndValues.ttcn 335 2017-07-31 09:04:53Z reinaortega $
* $Id: OneM2M_TypesAndValues.ttcn 340 2017-08-07 12:08:41Z reinaortega $
* @desc Module containing types and values for oneM2M
*
*/
module OneM2M_TypesAndValues {
import from XSD all;
import from OneM2M_Types all;
/* Constants */
const XSD.String c_defaultResourceName := "MyResource";
......
This diff is collapsed.
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