, - - PowerPoint PPT Presentation

0 1
SMART_READER_LITE
LIVE PREVIEW

, - - PowerPoint PPT Presentation

7, , 0,1


slide-1
SLIDE 1

, 0,1 (06,(,

!"" 78#$#$

%&'(''()

$,H,

  • CISC 836, Winter 2020

92

7,

  • ELL
  • ELL

:'

  • $
  • 8'
  • 8
  • 8%

:% @,,

'5 F!8T %5 .88T

  • ,+(-.%&%&

4(

',",32

38,,

8

2 C!D 2 0:E1 2 C01D! 2 ,

= 88

  • ,+(-.%&%&

4;

38,,)-,

  • 4?

,+(-.%&%&

slide-2
SLIDE 2

',",3#

*-,

888 8

2 88 88 =8 2 88 8

  • ,+(-.%&%&

4-

',",3

,*,

8 =

2 55 2 8

"5081V "506X71V

"

  • #8JJ6X7NN

JJ67)

  • #8JJ6X7NN

JJ67)

  • #8JJ6X7NN

JJ67)

  • ,+(-.%&%&

4@

',",

, "> ,,", 8 38, ,

Y 8

  • :
  • 01

*-,

Y 88 ,

,

G 8 8 ,

  • ,+(-.%&%&

4+

"0,,

8

2 E, 2 E

° O °

2 "E8

° :

B

2 M/G

° .:,,8

2 K 0<1

° ,

  • ,+(-.%&%&

44

slide-3
SLIDE 3

*,@((

O8 0O1

2 E8 2 !!" 2 H

0A:A101 08101 8081

2 B0,/1

9A

8 88 8

( 8,8,

68E7 8% > >

  • ,+(-.%&%&

'&&

*,@((5

8

2 55

  • ffice/floor1/room1/temperature/

!

  • ffice/floor1

2 !55

Hoffice/floor1/+/temperature Hoffice/*/temperature

,8

2 55

° 8HO '& ° 8"HOA

  • ,+(-.%&%&

'&'

(*.*@((*,'(

  • 9A
  • "

O 8= 8!EM/G O 8

,+(-.%&%& '&%

'(&8)-,@((*-,

  • MQTTProxyCapsule 0mqttproxycapsule.hh1
  • 8
  • host: String, port: Integer // to connect to broker
  • topic: String // topic of the messages sent
  • subscriptions: String // topics subscribed to
  • username, password: String
  • :8

2 =8

° =MQTTProxyCapsule ° =8031

2 ,8=8

° 8C8D ° 888D88C8D

2 C8D 68'V8%V>V87

'&( ,+(-.%&%&

slide-4
SLIDE 4

'(&8)-,@((*-, 5

'&;E(@ ,+(-.%&%&

  • 8H

pingPort.ping(5).send() { “protocol”: “PingPongProtocol” “signal”: “ping” “params”: [{ “name”: “round” “type”: “integer” “value”: 5 }] }

9A 8D 8= 8

8H:

'(&8)-, @((,*

  • UMLRTMQTTProtocol 0umlrtmqttprotocol.hh1

2 8 O8 2 8

° connect(host:String, port:Integer, uname:String, pwd:String)

55H mqtt.connect("mqtt.jahed.ca", 1883, "user1", "user1");

° disconnect() ° subscribe(topic: String)

55Hmqtt.subscribe("pong");

° publish(topic:string, msg:String)

55Hmqtt.publish("ping", roundStr);

2

° connected() ° disconnected() ° error(errno: Integer) ° received(topic:String, payload:String, length:Integer)

'&? ,+(-.%&%&

  • @((,*)-

'&- ,+(-.%&%&

  • "506"5357'++(6'76'71V

"506871V 50ZO[Z1V 50Z8[Z1V #'&)V 8 0Z[Z1V "580Z8Z1V LLV 50Z8[Z81V

9A 8

'(&8)-,(*,*

  • UMLRTTCPProtocol 0umlrttcpprotocol.hh1

2 8 8 2 8

° connect(host:String, port:Integer)

55H tcp.connect("127.0.0.1", 8888);

° disconnect() ° send(msg:String)

55Htcp.send("hotelSafe,doLock()");

2

° connected() ° disconnected() ° error(errno:Integer) ° received(topic:String, payload:String)

'&@ ,+(-.%&%&

slide-5
SLIDE 5

(* , * )-

'&+ ,+(-.%&%&

  • 850Z 01Z1V

50Z#F)A01Z1V 850Z A01Z1V

E,

50Z#F)Z1V 850Z'%@5&5&5'Z++++1V 00 \&\1SJ&NN0 RJ\4\11]] JJ\A\V 50Z#F)[ Z1V A501501V

(*.*@((*,'()-,

8

2 E, 2 8 #D'+)#AC'+)

=8N8

2 F # C'+)

  • #AC'+)A*9B56<H: B

<75/D'+A5%&'+ # C'+)M56A75/D'+5 8HEE5EA3E'+: # C'+)9B9K<B/!B5% .A8 5/D'+5%&'+ E, O

,+(-.%&%& '&4

30*,

01

2 :8E 2 8O

° B ° K% ° K8

:880:1

2 "E8F 2 K

  • ,+(-.%&%&

''&

0,,

  • (*.*

@((

  • *

!3; 7, 38, , *- , , *,

  • :8HEE5EA3E

=8885

B

,+(-.%&%& '''