Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
2c861ae8
Commit
2c861ae8
authored
6 years ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#43
Signed-off-by:
reinaortega
<
miguelangel.reinaortega@etsi.org
>
parent
30f10302
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LibOneM2M/OneM2M_Functions.ttcn
+10
-2
10 additions, 2 deletions
LibOneM2M/OneM2M_Functions.ttcn
OneM2M_PermutationFunctions.ttcn
+15
-6
15 additions, 6 deletions
OneM2M_PermutationFunctions.ttcn
with
25 additions
and
8 deletions
LibOneM2M/OneM2M_Functions.ttcn
+
10
−
2
View file @
2c861ae8
...
...
@@ -2211,12 +2211,20 @@ module OneM2M_Functions {
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_notifyNotification
(
mw_contentNotification
(
?
))))
->
value
v_request
{
//Send response
v_responsePrimitive
:=
valueof
(
m_responseNotification
(
int200
1
,
omit
));
v_responsePrimitive
:=
valueof
(
m_responseNotification
(
int200
0
,
omit
));
v_responsePrimitive
.
requestIdentifier
:=
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
;
mcaPortIn
.
send
(
m_response
(
v_responsePrimitive
));
log
(
__SCOPE__
&
": WARNING: Unexpected Notification message received"
);
repeat
;
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_notifyNotification
(
mw_contentNotificationVerification
)))
->
value
v_request
{
//Send response
v_responsePrimitive
:=
valueof
(
m_responseNotification
(
int2000
,
omit
));
v_responsePrimitive
.
requestIdentifier
:=
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
;
mcaPortIn
.
send
(
m_response
(
v_responsePrimitive
));
log
(
__SCOPE__
&
": WARNING: Unexpected Notification for Subscription Verification message received"
);
repeat
;
}
}
/**
...
...
@@ -2374,7 +2382,7 @@ module OneM2M_Functions {
* @return Internal resource index of AE or -1 in case of failure
* @verdict inconc if no AE registration request is received
*/
function
f_ae_preamble_registerAe
(
template
UtTriggerPrimitive
p_utRequest
:=
m_utCreateAe
)
runs
on
CseSimu
return
integer
{
function
f_ae_preamble_registerAe
(
template
UtTriggerPrimitive
p_utRequest
:=
m_utCreateAe
)
runs
on
CseSimu
return
integer
{
var
MsgIn
v_request
;
var
integer
v_localResourceIndex
,
v_parentIndex
;
...
...
This diff is collapsed.
Click to expand it.
OneM2M_PermutationFunctions.ttcn
+
15
−
6
View file @
2c861ae8
...
...
@@ -4718,10 +4718,11 @@ module OneM2M_PermutationFunctions {
//Local variables
var
MsgIn
v_response
;
var
RequestPrimitive
v_request
;
var
ResponsePrimitive
v_responsePrimitive
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
integer
v_ae2Index
:=
-
1
;
var
integer
v_acpAuxIndex
:=
-
1
;
var
integer
v_acpAuxIndex
:=
-
1
;
// Test control
...
...
@@ -4751,6 +4752,9 @@ module OneM2M_PermutationFunctions {
f_cse_preamble_subscriptionVerification
(
v_ae2Index
,
p_createRequestPrimitive
,
p_resourceType
);
v_resourceIndex
:=
f_cse_createResource
(
p_resourceType
,
p_createRequestPrimitive
);
//under the CSEBase resource
if
(
vc_ae2
.
running
)
{
vc_ae2
.
stop
;
}
}
else
{
//ResourceType = RemoteCSE
vc_cse1
.
start
(
f_cse_registerRemoteCse
(
p_createRequestPrimitive
));
vc_cse1
.
done
;
...
...
@@ -4761,16 +4765,12 @@ module OneM2M_PermutationFunctions {
//Test Body
v_request
:=
f_getUpdateRequestPrimitive
(
p_resourceType
,
v_resourceIndex
,
p_updateRequestPrimitive
);
if
(
p_resourceType
==
int23
)
{
//Subscription
if
(
(
p_resourceType
==
int23
)
and
(
ispresent
(
v_request
.
primitiveContent
.
subscription
.
notificationURI
)))
{
//Subscription
v_request
.
primitiveContent
.
subscription
.
notificationURI
:=
{
f_getResourceAddress
(
v_aeIndex
)};
}
mcaPort
.
send
(
m_request
(
v_request
));
if
(
p_resourceType
==
int23
)
{
//Subscription
f_cse_notifyProcedure_subscriptionVerificationHandler
();
}
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2004
)))
->
value
vc_response
{
...
...
@@ -4785,6 +4785,15 @@ module OneM2M_PermutationFunctions {
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
,
": Error while updating mandatory attribute"
);
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_notifyNotification
(
mw_contentNotificationVerification
)))
->
value
vc_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
":INFO: Notification for Subscription verification received"
);
v_responsePrimitive
:=
valueof
(
m_responseNotification
(
int2000
,
omit
));
v_responsePrimitive
.
requestIdentifier
:=
vc_request
.
primitive
.
requestPrimitive
.
requestIdentifier
;
mcaPortIn
.
send
(
m_response
(
v_responsePrimitive
));
tc_ac
.
start
;
repeat
;
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
,
": No answer while updating resource type "
&
int2str
(
enum2int
(
p_resourceType
)));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment