Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
TST
ATS
Commits
382fa8ba
Commit
382fa8ba
authored
Jul 07, 2016
by
Naum Spaseski
Browse files
Added serviceSubscribeAppRule type and template and added mcc port to config function
parent
f68c216d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
3 deletions
+79
-3
OneM2M_Functions.ttcn
OneM2M_Functions.ttcn
+5
-3
OneM2M_Templates.ttcn
OneM2M_Templates.ttcn
+42
-0
OneM2M_Types.ttcn
OneM2M_Types.ttcn
+32
-0
No files found.
OneM2M_Functions.ttcn
View file @
382fa8ba
...
...
@@ -33,6 +33,7 @@ module OneM2M_Functions {
// Map
map
(
self
:
mcaPort
,
system
:
mcaPort
);
map
(
self
:
mccPort
,
system
:
mccPort
);
map
(
self
:
acPort
,
system
:
acPort
);
activate
(
a_default
());
...
...
@@ -113,13 +114,13 @@ module OneM2M_Functions {
var
M2MResponsePrimitive
v_response
;
var
integer
v_cseBaseAuxIndex
:=
-
1
;
var
integer
v_acpAuxIndex
:=
-
1
;
var
ServiceSubscribedAppRule
v_serviceSubscribedAppRule
;
var
ServiceSubscribedAppRule
_optional
v_serviceSubscribedAppRule
;
v_serviceSubscribedAppRule
.
applicableCredIDs
:=
{
"None"
};
v_serviceSubscribedAppRule
.
allowedApp_IDs
:=
{
PX_APP_ID
};
v_serviceSubscribedAppRule
.
allowedAEs
:=
valueof
(
p_allowedAEs
);
mcaPort
.
send
(
m_request
(
m_create
CSEBas
e
(
v_serviceSubscribedAppRule
)));
mcaPort
.
send
(
m_request
(
m_create
ServiceSubscribedAppRul
e
(
v_serviceSubscribedAppRule
)));
tc_ac
.
start
;
alt
{
...
...
@@ -197,7 +198,8 @@ module OneM2M_Functions {
function
f_postamble_default
()
runs
on
M2M
{
unmap
(
self
:
mcaPort
,
system
:
mcaPort
);
unmap
(
self
:
mcaPort
,
system
:
mcaPort
);
unmap
(
self
:
mccPort
,
system
:
mccPort
);
unmap
(
self
:
acPort
,
system
:
acPort
);
//stop;
}
...
...
OneM2M_Templates.ttcn
View file @
382fa8ba
...
...
@@ -785,6 +785,32 @@ module OneM2M_Templates {
discoveryResultType
:=
omit
};
//Added by @Naum
template
(
value
)
RequestPrimitive
m_createServiceSubscribedAppRule
(
in
ServiceSubscribedAppRule_optional
p_serviceSubscribedAppRule
)
:=
{
operation
:=
int1
,
to_
:=
"NotInitialized"
,
from_
:=
PX_AE_ID_STEM
,
requestIdentifier
:=
"m_createCSE"
&
f_rnd
(
1
,
1000000
),
resourceType
:=
int1
,
primitiveContent
:=
{
any_1
:=
{{
ServiceSubscribedAppRule_optional
:=
m_contentCreateServiceSubscribedAppRule
(
p_serviceSubscribedAppRule
)}}
},
role
:=
omit
,
originatingTimestamp
:=
omit
,
requestExpirationTimestamp
:=
omit
,
resultExpirationTimestamp
:=
omit
,
operationExecutionTime
:=
omit
,
responseType
:=
omit
,
resultPersistence
:=
omit
,
resultContent
:=
omit
,
eventCategory
:=
omit
,
deliveryAggregation
:=
omit
,
groupRequestIdentifier
:=
omit
,
filterCriteria
:=
omit
,
discoveryResultType
:=
omit
};
template
(
value
)
RequestPrimitive
m_createSubscriptionBase
:=
{
operation
:=
int1
,
...
...
@@ -1044,6 +1070,22 @@ module OneM2M_Templates {
scheduleElement
:=
p_scheduleElement
,
//M
choice
:=
omit
//NP
};
template
(
value
)
ServiceSubscribedAppRule_optional
m_contentCreateServiceSubscribedAppRule
(
in
template
(
value
)
ServiceSubscribedAppRule_optional
serviceSubscribedAppRule
:=
omit
)
:=
{
resourceName
:=
omit
,
resourceType
:=
omit
,
resourceID
:=
omit
,
parentID
:=
omit
,
creationTime
:=
omit
,
lastModifiedTime
:=
omit
,
labels
:=
omit
,
accessControlPolicyIDs
:=
omit
,
expirationTime
:=
omit
,
applicableCredIDs
:=
serviceSubscribedAppRule
.
applicableCredIDs
,
allowedApp_IDs
:=
serviceSubscribedAppRule
.
allowedApp_IDs
,
allowedAEs
:=
serviceSubscribedAppRule
.
allowedAEs
,
choice
:=
omit
}
template
(
value
)
Subscription_optional
m_contentCreateSubscription
(
in
template
(
value
)
ListOfURIs
p_notificationURI
)
:=
{
resourceName
:=
c_defaultResourceName
,
//O
...
...
OneM2M_Types.ttcn
View file @
382fa8ba
...
...
@@ -4350,6 +4350,38 @@ group optionalResourceTypes {
variant
(
choice
.
choice_list
[
-
])
"untagged"
;
};
//Added by @Naum
type
record
ServiceSubscribedAppRule_optional
{
XSD
.
NCName
resourceName
optional
,
ResourceType
resourceType
optional
,
XSD
.
ID
resourceID
optional
,
NhURI
parentID
optional
,
Timestamp
creationTime
optional
,
Timestamp
lastModifiedTime
optional
,
Labels
labels
optional
,
AcpType
accessControlPolicyIDs
optional
,
Timestamp
expirationTime
optional
,
ListOfM2MID
applicableCredIDs
optional
,
ListOfM2MID
allowedApp_IDs
optional
,
ListOfM2MID
allowedAEs
optional
,
union
{
record
length
(
1
..
infinity
)
of
ChildResourceRef
childResource_list
,
record
length
(
1
..
infinity
)
of
Subscription
subscription_list
}
choice
optional
}
with
{
variant
"name as uncapitalized"
;
variant
"element"
;
variant
(
resourceName
)
"attribute"
;
variant
(
allowedApp_IDs
)
"name as 'allowedApp-IDs'"
;
variant
(
choice
)
"untagged"
;
variant
(
choice
.
childResource_list
)
"untagged"
;
variant
(
choice
.
childResource_list
[
-
])
"name as 'childResource'"
;
variant
(
choice
.
subscription_list
)
"untagged"
;
variant
(
choice
.
subscription_list
[
-
])
"name as 'subscription'"
;
};
type
record
Subscription_optional
{
XSD
.
NCName
resourceName
optional
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment