This is useful for when we want to send the DCCL message wrapped in some other message such that the Protobuf type is known already and don't want to spend the 1-2 bytes to store the ID in the message.
Fixes #92.
Use by setting
option (dccl.msg).omit_id = true;
rather than including a (dccl.msg).id. Any of the decode methods that take a google::protobuf::Message* as an argument can be used where the correct fully instantiated Protobuf class is passed, providing the correct Descriptor to use to decode.
Also updated the normal case (omit_id: false) to check the descriptor ID against the received ID in the case where these decode methods are used. If they don't match, an exception is thrown.
This is useful for when we want to send the DCCL message wrapped in some other message such that the Protobuf type is known already and don't want to spend the 1-2 bytes to store the ID in the message.
Fixes #92.
Use by setting
rather than including a
(dccl.msg).id
. Any of thedecode
methods that take agoogle::protobuf::Message*
as an argument can be used where the correct fully instantiated Protobuf class is passed, providing the correct Descriptor to use to decode.Also updated the normal case (
omit_id: false
) to check the descriptor ID against the received ID in the case where thesedecode
methods are used. If they don't match, an exception is thrown.