Each channel is responsible for defining its own inner protocol & message types. Message deserialization will therefore be split into two phases. With the first phase consisting of the parsing header, validating authenticity, deduping and decryption. The inner buffer will be passed up to the owner to manage the second part of the deserialization. Discovery Messages For , a device sends out a presence request and a second device responds with presence response message. For Bluetooth, devices advertise over a , which does not require discovery. UDP: Presence Request This is the UDP presence request message any device can subscribe to and respond to these – messages in order to participate in the Connected Devices Protocol message exchange. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Message Type Discovery Type Field Type Description Indicates current message type in – this case, Discovery. This comes from the common header. Values: None = 0, Message Type UINT8 Discovery = 1, Connect = 2, Control = 3, Session = 4, Ack = 5 Indicates type of discovery message, in this case, Presence Request. Discovery Type UINT8 Presence Request = 0, Presence Response = 1 UDP: Presence Response When a device receives a presence request, it responds with a presence response to notify that it’s available. 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Message Type Discovery Type Connect Mode Device Type Device Name Length
Each channel is responsible for defining its own inner protocol & message types. Message deserialization will therefore be split into two phases. With the first phase consisting of the parsing header, validating authenticity, deduping and decryption. The inner buffer will be passed up to the owner to manage the second part of the deserialization. Discovery Messages For , a device sends out a presence request and a second device responds with presence response message. For Bluetooth, devices advertise over a , which does not require discovery. UDP: Presence Request This is the UDP presence request message – any device can subscribe to and respond to these messages in order to participate in the Connected Devices Protocol message exchange. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 Message Type Discovery Type Field Type Description Message Type UINT8 Indicates current message type – in this case, Discovery. This comes from the common header. Values: None = 0, Discovery = 1, Connect = 2, Control = 3, Session = 4, Ack = 5 Discovery Type UINT8 Indicates type of discovery message, in this case, Presence Request. Presence Request = 0, Presence Response = 1 UDP: Presence Response When a device receives a presence request, it responds with a presence response to notify that it’s available. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 Message Type Discovery Type Connect Mode Device Type Device Name Length