@@ -6,7 +6,7 @@ the [tutorial27](../../tutorials/tutorial27) presented sub-protocols definition.
66to define variant fields from the [ tutorial4] ( ../../tutorials/tutorial4 ) as sub-protocol messages.
77
88The ` KeyValueProp ` ` <variant> ` field is replaced by the sub-protocol defined in the ` var1 ` namespace.
9- ```
9+ ``` xml
1010<ns name =" var1" >
1111 <fields >
1212 <enum name =" PropKey" type =" uint8" semanticType =" messageId" >
@@ -44,7 +44,7 @@ The frame is implemented as a pair of `<id>` and `<payload>` layers. Every prope
4444separate ` <message> ` with a single ** Val** field.
4545
4646Similarly the ` TlvProp ` ` <variant> ` field is replaced by the sub-protocol defined in the ` var2 ` namespace.
47- ```
47+ ``` xml
4848<ns name =" var2" >
4949 <fields >
5050 <enum name =" PropKey" type =" uint8" semanticType =" messageId" >
@@ -87,7 +87,7 @@ Similarly the `TlvProp` `<variant>` field is replaced by the sub-protocol define
8787The frame in this case is implemented as ` <id> ` , ` <size> ` and ` <payload> ` triplet.
8888
8989The original protocol definition was moved into the ` prot ` namespace.
90- ```
90+ ``` xml
9191<ns name =" prot" >
9292 <fields >
9393 <string name =" Msg1Name" defaultValue =" Message 1" />
@@ -127,7 +127,7 @@ decode the sub-protocol messages, it just echoes back raw data.
127127
128128The [ client] ( ClientSession.cpp ) on the other hand has to introduce some extra smarts. The
129129original ` Msg1 ` is defined having a count prefixed list of the ` KeyValueProp ` ` <variant> ` field.
130- ```
130+ ``` xml
131131<message name =" Msg1" id =" MsgId.M1" displayName =" ^Msg1Name" >
132132 <list name =" F1" element =" KeyValueProp" >
133133 <countPrefix >
@@ -171,7 +171,7 @@ void ClientSession::handle(Msg2& msg)
171171```
172172
173173Another important aspect to notice is the way the protocol options are defined.
174- ```
174+ ``` cpp
175175using ProtOpts =
176176 howto11::options::DataViewDefaultOptionsT<
177177 howto11::options::ClientDefaultOptions
0 commit comments