1 / 32

Communication Model

Communication Model. MSE Presentation II Acharaporn Pattaravanichanon. Overview. Updated Document Implementation Plan Project Overview Architecture Design Formal Requirement Specification Test Plan Formal Inspection Demo. Updated Document. Software Requirement Specification

Download Presentation

Communication Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Communication Model MSE Presentation II Acharaporn Pattaravanichanon

  2. Overview • Updated Document • Implementation Plan • Project Overview • Architecture Design • Formal Requirement Specification • Test Plan • Formal Inspection • Demo

  3. Updated Document • Software Requirement Specification • Project Plan

  4. Use Case Diagram

  5. Critical Requirement • support the ability to register robot to the system • support the ability to send and receive broadcast message • Only simulated robot that has broadcast capability shall send or receive broadcast message • support the ability to send and receive point-to-point message • Only simulated robot that has point-to-point capability shall send or receive point-to-point message. • Only simulated robot with active receive link shall receive message. • Only simulated robot with active send link shall send message. • support the ability to start up or shutdown all the communication links or for each robot.

  6. Project Plan Phase III Construction Phase June 23 – August 19 • Modify Phase II document June 23 – June 29 • Create component diagram June 29 – July 7 • Coding July 8 – July 13 • Testing July 14 – July 28 • User manual July 29 – July 30 • Project evaluation August 2 – August 6 • Final presentation slides August 9 – August 10 • Prepare final documentation August 11 – August 12 • Final presentation August 19

  7. Implementation Plan

  8. Cost Estimation • From COCOMO I model estimated time to complete this project = 3.74 months = 568 hours • The implementation phase needs 37 days * 7 = 259 hours • So far, this project spent time less than 250 hours. • This project will spend time less than the estimation.

  9. Project Overview Robot connectToEnv() Environment sendMessages() registerRobot(name,commType) recvAllMessages() sendMessage(msg,timeStep) Message getMessage(name,timeStep) Message[] Communication Model setParameter(p) setParameter(p) Environment Control Panel

  10. Architecture Design • Class diagram • Sequence diagram • State diagram

  11. Class diagram

  12. Sequencediagram-register robot

  13. Sequencediagram-send message (Broadcast)

  14. Sequencediagram-send message (Point-to-Point)

  15. Sequencediagram-get message

  16. State Diagram

  17. Formal RequirementSpecification(UML/OCL) Invariant • Robot has unique name. context RobotCommRecord inv UniqueName: RobotCommRecord.allInstances->forAll(p1,p2| p1 <> p2 implies p1.name <> p2.name)

  18. 2.Only robot with broadcast ability can send and receive broadcast message. context RobotCommRecord inv BroadcastAbility1: RobotCommRecord.allInstances.hasQueue.hasMessages ->select(receiver='broadcast' and sender=self.name) ->notEmpty implies self.isBroadcastEnabled = true context r:RobotCommRecord inv BroadcastAbility2: r.hasQueue.hasMessages ->select(receiver='broadcast')->notEmpty implies r.isBroadcastEnabled = true

  19. Only robot with point-to-point ability can send and receive point-to-point message. context RobotCommRecord inv P2PAbility1: RobotCommRecord.allInstances.hasQueue.hasMessages ->select(receiver <> 'broadcast' and sender=self.name) ->notEmpty implies self.isP2PEnabled = true context r:RobotCommRecord inv P2PAbility2: r.hasQueue.hasMessages ->select(receiver <> 'broadcast')->notEmpty implies r.isP2PEnabled = true

  20. 4.Only robot with active send link can send message. context RobotCommRecord inv sendAbility: RobotCommRecord.allInstances.hasQueue.hasMessages ->select(sender=self.name)->notEmpty implies self.isSendLinkEnabled = true 5. Robot with active receive link can receive messages from other robots context r:RobotCommRecord inv receiveAbility: r.hasQueue.hasMessages->notEmpty implies r.isReceiveLinkEnabled = true

  21. 6.Messages are distributed to the right robot queue context RobotCommRecord inv rightQueue: hasQueue.hasMessages->forAll((receiver=self.name) or (receiver='broadcast')) 7. The messages in priorityQueue are ordered by received time context p:PriorityQueue inv priorityQueue: Sequence{1..(p.hasMessages->size-1)}-> forAll(i | p.hasMessages->at(i).receivedTime <= p.hasMessages->at(i+1).receivedTime)

  22. If received time is defined, then received time is equal or greater than sent time context m:Message inv rightTime: m.receivedTime.isDefined implies m.receivedTime >= m.sentTime • Robots cannot send or receive any messages if all the links are shutdown context c:CommunicationsSystem inv allLinkShutdown: RobotCommRecord.allInstances.hasQueue.hasMessages ->notEmpty implies c.isLinkEnabled = true

  23. Robots cannot get the messages which are sent by themselves. context r:RobotCommRecord inv sendToYourself: r.hasQueue.hasMessages->forAll(sender <> r.name)

  24. registerRobot(n:String,c:Integer) • Precondition • n.isDefined • c.isDefined • (c=1 or c=2 or c=3) • robots->select(name=n)->isEmpty • Post condition • robots->exists(r | r.oclIsNew and r.name = n) • robots=robots@pre->union(robots->select(name=n)) • robots->select(name=n)->size = 1 • (c=1)implies robots->select(name=n and isBroadcastEnabled=true and isP2PEnabled=false)->notEmpty • (c=2) implies robots->select(name=n and isP2PEnabled=true andisBroadcastEnabled=false)->notEmpty • (c=3) implies robots->select(name=n and isBroadcastEnabled=true and isP2PEnabled=true)->notEmpty

  25. sendMessage(msg:Message,timeStep:Integer) • Precondition • isLinkEnabled = true • robots->select(name=msg.sender)->forAll(isSendLinkEnabled = true) • msg.receiver = 'broadcast' implies robots->select(name=msg.sender) ->forAll(isBroadcastEnabled = true) •  msg.receiver <> 'broadcast' implies robots->select(name=msg.sender)-> forAll(isP2PEnabled = true) • Post condition • msg.sentTime = timeStep • msg.receivedTime = timeStep • msg.receiver = 'broadcast' implies robots->select(name <> msg.sender and isReceiveLinkEnabled = true and isBroadcastEnabled = true) ->forAll(r| r.hasQueue.hasMessages->asSet = r.hasQueue.hasMessages@pre->including(msg)->asSet) • msg.receiver <> 'broadcast' implies robots->select(name = msg.receiver and isReceiveLinkEnabled = true and isP2PEnabled = true) ->forAll(r| r.hasQueue.hasMessages->asSet = r.hasQueue.hasMessages@pre->including(msg)->asSet)

  26. getMessage(n:String,timeStep:Integer):Set(Message) • Precondition • n.isDefined • robots.exists(r| r.name=n) • timeStep.isDefined • timeStep > 0 • Post condition • robots->select(name = n) ->forAll(r | r.hasQueue.hasMessages->asSet = r.hasQueue.hasMessages@pre->asSet - r.hasQueue.hasMessages@pre ->select(receivedTime = timeStep)->asSet) • robots->select(name=n) ->forAll(r| result= r.hasQueue.hasMessages@pre ->select(receivedTime = timeStep)->asSet)

  27. Register robot. Sending broadcast message Sending point-to-point message Receiving broadcast message Receiving point-to-point message Start up all links Shutdown all links Set system range Set system delay Set system delivery probability Enable broadcast capability Disable broadcast capability Enable point-to-point capability Disable point-to-point capability Start up robot’s send link Shutdown robot’s send link Start up robot’s receive link Shutdown robot’s receive link Set robot range Set robot delay Set robot deliver probability Test Plan – Features to be tested

  28. Test Plan • Unit testing • Integration testing • System testing

  29. Formal Inspection 1.The symbols using in use case diagram conform to UML diagram. 2. The symbols using in class diagram conform to UML diagram. 3. The symbols using in sequence diagram conform to UML diagram. 4. Use case diagram and descriptions are clear and well organized. 5. Class diagram and descriptions are clear and well organized. 6. Each message passing in sequence diagram is the method in class diagram. 7. Each message passing in sequence diagram must be defined as public method. 8. Class names are well defined and indicate their meaning 9. The architecture design covers the entire requirement defined in Software Requirement Specification.

  30. Demo • Start Communication System • Register 3 robots • Robot “A” has only broadcast ability • Robot “B” has only P2P ability • Robot “C” has both broadcast and P2P • Send and receive message • Disable incoming link • Disable outgoing link

More Related