Commit 6ab5a9fb by amir

new and moved from svn

parent ee0a8b83
Showing with 415 additions and 0 deletions
No preview for this file type
No preview for this file type
No preview for this file type
Api's
entity is defined by 2 fields:
type: entity type (using urn form so instead of '/' to be able to use entity in simple rest operations)
id: also in urn form
Api table:
NAME CLIENT SERVER
- updateContext(type,id,attributes,updateAction); updateAction : APPEND/UPDATE/DELETE * *
- queryContext(type,id, attributes); attributes can be null *
- subscribeContext(type,id, notifyConditions); * *
- unsubscribeContext(type,id, notifyConditions); * *
[create context]
POST [url]/updateContext
{
"contextElements": [
{
"type": "iot:home-gw",
"isPattern": "false",
"id": "0545596165:home-gw",
"attributes": [
{
"name" : "temperature",
"type" : "float",
"value" : "23",
},
{
"name": "pressure",
"type": "integer",
"value": "720"
}
]
}
],
"updateAction": "APPEND"
}
[query context]
POST [url]/queryContext
{
"entities": [
{
"type": "iot:home-gw",
"isPattern": "false",
"id": "0545596165:home-gw"
}
],
"attributes" : [
"temperature"
]
}
[subscribeContext]
MQTT iot:home-gw/0545596165:home-gw/command/+
MQTT iot:home-gw/0545596165:home-gw/onchange/temperature
<HTML>
<HEAD>
<TITLE>Index for MqttRegistration.SCN</TITLE>
</HEAD>
<BODY BGCOLOR=WHITE>
<h1>Index for MqttRegistration.SCN</h1>
<br><p>EventStudio System Designer 5<br> Generated on 13-Nov-14 10:34</p><br>
<table border="1" align="center" cellspacing="0">
<tr>
<th>Sequence Diagram</th>
<td><ul>
<li><a href="MqttRegistration.SCN Sequence Diagram.pdf">MqttRegistration.SCN Sequence Diagram</a></li>
</ul></td>
</tr>
</table>
</BODY>
</HTML>
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
#include "inc.fdl"
module: MCX
component: IOT in MCX
component: MTR in MCX
component: CommLogic in MCX
eternal: IOT_A in IOT
eternal: MTRApp in MTR
eternal: Servlet in CommLogic
feature ""
endfeature
#include "inc.fdl"
module: MCX
component: IOT in MCX
component: MTR in MCX
component: CommLogic in MCX
eternal: IOT_A in IOT
eternal: MTRApp in MTR
eternal: Servlet in CommLogic
{fulltheme} feature "Mqtt Register"
(*
MTR Subscriptions (MQTT BROKER): *)
(*Sub: mcz/+
Pub: mcz/+ ( for terminating : mcz/term/+ )
*)
(*IOT Subscriptions (MQTT BROKER): *)
(*Sub: mcz/clientId/+
Pub: mcz/orig/clientId/chat/termId
*)
"mcz/orig/97297705811/activity/register" ("{",
"'source': '97297705811'",
"'dest': '97297705811'",
"'id': 'mcz/97297705811/register/1414931344387'[IRI]",
"'published': '2011-02-10T15:04:55Z'",
"'metaData': {",
"'Contact':'<sip:97297705811@127.0.1.1:5060>'",
"'Expires':'15' }}" ) : IOT_A -> MTRApp
(*id is IRI [RFC4627] *)
"POST /CommLogic/api/process/processSipRequest" ("{'serverUri':'172.16.1.5:5076'",
"'incomingHostPort':'127.0.1.1:5060'",
"'method':'REGISTER'",
"'origIdentity':'97297705811'",
"'termIdentity':'97297705811'",
"'route':null",
"'contentType':null,'content':null",
"'error':null",
"'headersList':[",
"{'name':'Contact'",
"'value':'<sip:97297705811@127.0.1.1:5060",
";transport=UDP>'}",
"{'name':'Expires','value':'15'",
"}]",
"'destUriList':null",
"'eAction':null,'respCode':0 }") : MTRApp -> Servlet
"200 OK" ("{'serverUri': null",
"'incomingHostPort': null",
"'method': null",
"'origIdentity': null",
"'termIdentity': null",
"'route': null",
"'headersList': [",
"{",
"'name': 'WWW-Authenticate'",
"'value': 'Digest realm=\'GalleryAS\'",
"nonce=\'0f86b2b218e56a644bb454cf2717b99e\'",
"opaque=\'\',stale=FALSE,algorithm=MD5'",
"'valid': true",
"}",
"]",
"'contentType': null",
"'content': null",
"'error': null",
"'destUriList': null",
"'isParallel': false",
"'seqTO': 0",
"'activityKey': null",
"'eAction': 'E_SEND_RESP'",
"'respCode': 401}") : Servlet -> MTRApp
"mcz/97297705811/activity/register/resp" ("{",
"'source': '97297705811'",
"'dest': '97297705811'",
"'id': 'mcz/97297705811/register/1414931344387'",
"'published': '2011-02-10T15:04:56Z'",
"'metaData': {",
"'respCode': 401",
"'WWW-Authenticate ':'Digest realm='GalleryAS'",
"nonce='0f86b2b218e56a644bb454cf2717b99e'",
"opaque='',stale=FALSE,algorithm=MD5'",
"}}") : MTRApp -> IOT_A
"mcz/orig/97297705811/activity/register" ("{",
"'source':'97297705811'",
"'dest':'97297705811'",
"'id':'mcz/97297705811/register/1414931344389'",
"'type':'register'",
"'published': '2011-02-10T15:05:55Z'",
"'metaData': {'Contact':",
"'yacov'<sip:97297705811@df7jal23ls0d.invalid;",
"transport=ws;ws-uid=8>;expires=200;",
"+g.oma.sip-im;+audio;language='en,fr';",
"regId=1;+sip.instance=",
"'<urn:uuid:6d59485c-0d59-d1e6-55de-",
"55a4071599d6>'",
"'Expires':'200'",
"Authorization:'Digest username='97297705811'",
"realm='GalleryAS'",
"nonce='0f86b2b218e56a644bb454cf2717b99e'",
"uri='sip:172.16.1.97'",
"response='8b28e25bfd657a7fd7e177d20113d1f0'",
"algorithm=MD5 }}") : IOT_A -> MTRApp
"POST /CommLogic/api/process/processSipRequest" ("{",
"'serverUri': '172.16.1.97:5076'",
"'incomingHostPort': 'df7jal23ls0d.invalid'",
"'method': 'REGISTER'",
"'origIdentity': '97297705811'",
"'termIdentity': '97297705811'",
"'route': null",
"'contentType': null",
"'content': null",
"'error': null",
"'headersList': [",
"{'name': 'Contact'",
"'value':",
"'yacov'<sip:97297705811@df7jal23ls0d.invalid;",
"transport=ws;ws-uid=8>;expires=200;",
"+g.oma.sip-im;+audio;language='en,fr';",
"regId=1;+sip.instance='<urn:uuid:",
"6d59485c-0d59-d1e6-55de-55a4071599d6>'",
"},{",
"'name': 'Expires'",
"'value': '200'",
"},{",
"'name': 'Authorization'",
"'value': 'Digest username='97297705811'",
"realm='GalleryAS'",
"nonce='0f86b2b218e56a644bb454cf2717b99e'",
"uri='sip:172.16.1.97'",
"response='8b28e25bfd657a7fd7e177d20113d1f0'",
"algorithm=MD5",
"} ]",
"'destUriList': null",
"'eAction': null",
"'respCode': 0}") : MTRApp -> Servlet
"200 OK" ("{'serverUri':null",
"'incomingHostPort':null",
"'method':null,'origIdentity':null",
"'termIdentity':null,'route':null",
"'headersList':[{",
"'name':'Contact'",
"'value':'yacov'<sip:97297705811@df7jal23ls0d",
".invalid;transport=ws;ws-uid=8>;expires=200;",
"+g.oma.sip-im;+audio;language='en,fr';",
"regId=1;+sip.instance='<urn:uuid:6d59485c-",
"0d59-d1e6-55de-55a4071599d6>','valid':true}]",
"'contentType':null,'content':null",
"'error':null,'destUriList':null",
"'isParallel':false,'seqTO':0",
"'activityKey':null,'eAction':'E_SEND_RESP'",
"'respCode':200}") : Servlet -> MTRApp
"mcz/97297705811/activity/register/resp" ("{'action':'update'",
"'source': '97297705811'",
"'dest': '97297705811'",
"'id': 'mcz/97297705811/register/1414931344389'",
"'published': '2011-02-10T15:04:56Z'",
"'metaData': {",
"'respCode': 200",
"'Contact':",
"'yacov'<sip:97297705811@df7jal23ls0d",
".invalid;transport=ws;ws-uid=8>;expires=200;",
"+g.oma.sip-im;+audio;language='en,fr';",
"regId=1;+sip.instance='<urn:uuid:6d59485c-",
"0d59-d1e6-55de-55a4071599d6>' }}") : MTRApp -> IOT_A
endfeature
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
#include "inc.fdl"
module: MCZ
component: MyCommZone in MCZ
component: MyContentZone in MCZ
eternal: Client in MyCommZone
eternal: SRG in MyCommZone
eternal: CommLogic in MyCommZone
eternal: ContentLogic in MyContentZone
dynamic: ServiceSession in MyContentZone
feature "Service"
MESSAGE ("service_id@MContentZone.com",public_id,content) : Client->SRG
"processSipRequest" ("JSON(ProcessContentModel)") : SRG->CommLogic
CommLogic takes action "AuthorizeService"
"POST activateService/service_id/public_id" (content,callback_url) : CommLogic->ContentLogic
ContentLogic creates ServiceSession
"202 Accept {session_id : 1234}" : ContentLogic->CommLogic
"202 Accept" ("JSON(ProcessContentModel)") : CommLogic->SRG
"202 Accept, content({session_id : 1234})": SRG->Client
ServiceSession takes action "StartServiceWorkflow" (* starting the service workflow - getting the data *)
ServiceSession takes action "BuildServiceInfo"
"POST callback_url(session_id,info)" : ServiceSession->CommLogic (* callback to CommLogic instead of directly to SRG
will hide the sendmessage logic from ServiceSession *)
case
leg "NON-ITERATIVE SERVICE":
ContentLogic deletes ServiceSession
leg "ITERATIVE SERVICE":
endcase
"POST sendmessage_api (JSON(params))" : CommLogic->SRG
MESSAGE ("public_id@srg_domain",content) : SRG->SRG (* terminating*)
"processSipRequest" ("JSON(ProcessContentModel)") : SRG -> CommLogic
"200 OK" ("JSON(ProcessContentModel)") : CommLogic->SRG
MESSAGE ("public_id@srg_domain","Contact: service_id@MContentZone.com;sinstane=1234", content) : SRG->Client
if "ITERATIVE SERVICE"
(* user choose option *)
MESSAGE ("service_id@MContentZone.com;sinstane=1234",content) : Client->SRG
"processSipRequest" ("JSON(ProcessContentModel)") : SRG->CommLogic
CommLogic takes action "AuthorizeService"
"POST progressService/service_id/public_id/1234" (content) : CommLogic->ContentLogic
"200 OK {session_id : 1234}" : ContentLogic->CommLogic
"200 OK" ("JSON(ProcessContentModel)") : CommLogic->SRG
"200 OK, content({session_id : 1234})": SRG->Client
ContentLogic deletes ServiceSession
endif
endfeature
\ No newline at end of file
No preview for this file type
No preview for this file type
/* == inc.fdl == */
#include "style-gray-black-modern.fdl"
/* -- Custom style declarations -- */
/* color is specified as red, green and blue numbers between 0.0 and 1.0 */
style q931 : color="1.0,0.0,0.0"
style h245 : color="0.0,0.0,1.0"
style sub : color="0.5,0.0,1.0", linepattern="- -", linewidth="2.0"
style voice: color="1.0,0.0,1.0", linepattern="- -", linewidth="2.0"
style sdp: linepattern="- -"
style rtp: color="0.5,0.1,0.5"
style rtcp: color="0.6,0.0,0.6"
style act : color="0.0,0.5,0.0"
/* -- Theme declaration -- */
/* Theme statement was generated by the "Tools->Copy Options as Theme"
command. */
theme fulltheme: messageParameterFormatting = "single-parameter-per-line-left-align",
sequenceDiagramHeader = "multi-tier-header",
blockRemarkFormatting = "left-align",
assignSequenceNumbersInSequenceDiagrams = "false",
includeRemarkColumnInSequenceDiagrams = "true",
paperSize = "letter",
optimizeDiagramsByRemovingNonparticipatingObjectsAndScenarios = "true",
optimizeMessageLayoutForLongParameterLists = "false",
sequenceDiagramLayout = "auto-choose-between-portrait-landscape",
pageMarginPDF = "small",
pageMarginEMF = "small",
headingAndTitleFont = "Arial Narrow",
sequenceDiagramMessageNameFont = "Arial Narrow",
sequenceDiagramMessageNameFontSize = "10",
collaborationDiagramMessageNameFont = "Arial Narrow",
collaborationDiagramMessageNameFontSize = "8",
messageParameterFont = "Courier New",
messageParameterFontSize = "6",
actionBoxFont = "Arial Narrow",
actionBoxFontSize = "8",
remarkFont = "Arial Narrow",
remarkFontSize = "9",
blockRemarkFont = "Arial Narrow",
blockRemarkFontSize = "10"
theme postertheme: messageParameterFormatting = "single-parameter-per-line-left-align",
sequenceDiagramHeader = "multi-tier-header",
blockRemarkFormatting = "left-align",
assignSequenceNumbersInSequenceDiagrams = "false",
includeRemarkColumnInSequenceDiagrams = "true",
paperSize = "B",
optimizeDiagramsByRemovingNonparticipatingObjectsAndScenarios = "true",
optimizeMessageLayoutForLongParameterLists = "false",
sequenceDiagramLayout = "auto-choose-between-portrait-landscape",
pageMarginPDF = "small",
pageMarginEMF = "small",
headingAndTitleFont = "Arial Narrow",
sequenceDiagramMessageNameFont = "Arial",
sequenceDiagramMessageNameFontSize = "10",
collaborationDiagramMessageNameFont = "Arial",
collaborationDiagramMessageNameFontSize = "8",
messageParameterFont = "Courier New",
messageParameterFontSize = "6",
actionBoxFont = "Arial Narrow",
actionBoxFontSize = "8",
remarkFont = "Arial Narrow",
remarkFontSize = "9",
blockRemarkFont = "Arial Narrow",
blockRemarkFontSize = "10"
theme overviewtheme:messageParameterFormatting = "single-parameter-per-line-left-align",
sequenceDiagramHeader = "multi-tier-header",
blockRemarkFormatting = "left-align",
assignSequenceNumbersInSequenceDiagrams = "false",
includeRemarkColumnInSequenceDiagrams = "false",
paperSize = "letter",
optimizeDiagramsByRemovingNonparticipatingObjectsAndScenarios = "true",
optimizeMessageLayoutForLongParameterLists = "false",
sequenceDiagramLayout = "auto-choose-between-portrait-landscape",
pageMarginPDF = "small",
pageMarginEMF = "small",
headingAndTitleFont = "Arial Narrow",
sequenceDiagramMessageNameFont = "Arial Narrow",
sequenceDiagramMessageNameFontSize = "10",
collaborationDiagramMessageNameFont = "Arial Narrow",
collaborationDiagramMessageNameFontSize = "8",
messageParameterFont = "Courier New",
messageParameterFontSize = "6",
actionBoxFont = "Arial Narrow",
actionBoxFontSize = "8",
remarkFont = "Arial Narrow",
remarkFontSize = "9",
blockRemarkFont = "Arial Narrow",
blockRemarkFontSize = "10"
\ No newline at end of file
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 sign in to comment