High Level Communication Protocols Flashcards

1
Q

Describe a publish-subscribe service

A

A distributed network of devices (clients). Clients publish data to a server (broker). Data that is published is tagged with a topic and clients that want access to a topic subscribe to it. When the broker receives new data it pushes is to all clients subscribed to that topic. Clients can be publishers to some topics and subscribers to others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the advantages of publish-subscribe services?

A

Clients never have direct contact
Publishers don’t know how the network is laid out
Publishers operate separately to subscribers
Good scalability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is message queue telemetry transport?

A

Designed for resource constrained devices and low bandwidth, high latency networks. MQTT is a lightweight publish-subscribe messaging transport. It is commonly used for machine to machine and IoT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does a control area network work?

A

Electronic control units (ECUs) act as nodes connected by a CAN bus. Any ECU can communicate with any other ECU without overloading the central controller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the goals of CAN?

A
Low cost
Flexible
Robust
Efficient
Centralised monitoring 
No centralised network controller
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are messages transmitted using CAN?

A

Data is sent in packets called frames. Nodes detect collisions or corrupted messages and retransmits. A message is formatted as a SOF (start of frame), DLC (data length code) which is the number of bytes to be transmitted and CRC (cyclic redundancy check) which is error detection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does the physical layer of CAN work?

A

The CAN bus uses two wires (CANH & CANL). Termination resistors damp out reflected energy on the wire. The voltage between the two wires is zero when no node is driving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is arbitration?

A

Logic 0 is the dominant state
Logic 1 is the recessive state
Messages start with an arbitration field and the first device to transmit a 1 loses arbitration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How is CAN synchronised?

A

There’s no clock so receivers are synchronised on recessive to dominant clock edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is bit stuffing?

A

If data contains a long string of 0s or 1s an additional 1 or 0 is added to help synchronisation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is carrier sense multiple address?

A

Nodes monitor the bus for inter-frame space and transmit in this space. All nodes have an equal right to transmit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name two high level CAN protocols

A

On-board diagnosis

CANopen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How is MQTT initiated?

A

Include libraries to support ethernet connection and pub/sub
Define MQTT broker
Define function to be called when subscribed data updates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly