PAYLOAD Layer
namespace comms
{
template <typename TMessage>
class MsgDataLayer
{
public:
// Define type of the message interface
using Message = TMessage;
// Type of the pointer to message is not defined yet, will be defined in
// the layer that processes message ID
using MsgPtr = void;
// ReadIterator is the same as Message::ReadIterator if such exists, void
// otherwise.
using ReadIterator = typename std::conditional<
Message::InterfaceOptions::HasReadIterator,
typename TMessage::ReadIterator,
void
>::type;
// WriteIterator is the same as Message::WriteIterator if such exists, void
// otherwise.
using WriteIterator = typename std::conditional<
Message::InterfaceOptions::HasWriteIterator,
typename TMessage::WriteIterator,
void
>::type WriteIterator;
...
};
} // namespace commsLast updated