OnixS C++ CME MDP Conflated TCP Handler  1.3.6
API Documentation
SbeMessage Class Reference

#include <OnixS/CME/ConflatedTCP/messaging/SbeMessage.h>

Classes

struct  NoCheck
 
struct  NoFieldsInit
 
struct  NoInit
 

Public Types

typedef MessageSize EncodedLength
 
typedef MessageSize BlockLength
 

Public Member Functions

 SbeMessage () noexcept
 
 SbeMessage (void *data, MessageSize size, SchemaVersion version)
 
 SbeMessage (void *data, MessageSize size)
 
 SbeMessage (void *data, MessageSize size, NoCheck) noexcept
 
void clear () noexcept
 
bool valid () const noexcept
 
MessageTemplateId templateId () const noexcept
 
SchemaVersion version () const noexcept
 
SchemaId schemaId () const noexcept
 
const void * binary () const noexcept
 
void * binary () noexcept
 
const void * blockEnd () noexcept
 
const void * blockEnd () const noexcept
 
MessageSize bufferSize () const noexcept
 
void * body () noexcept
 
BlockLength blockLength () const noexcept
 
const void * block () const noexcept
 
void * block () noexcept
 
- Public Member Functions inherited from SbeFields< Messaging::SbeMessage, MessageSize >
Messaging::SbeMessagecontainer () noexcept
 
void setOrdinary (MessageSizeoffset, FieldValue value) noexcept
 
void setOrdinary (MessageSizeoffset, FieldValue value, SchemaVersion since)
 
void setEnumeration (MessageSizeoffset, typename Enumeration::Enum value) noexcept
 
void setEnumeration (MessageSizeoffset, typename Enumeration::Enum value, SchemaVersion since)
 
void setFixedStr (MessageSizeoffset, StrRef value) noexcept
 
void setFixedStr (MessageSizeoffset, StrRef value, SchemaVersion since)
 

Protected Types

typedef SbeGroupList< MessageSizeGroupList
 
typedef SbeVariableLengthFieldList< MessageSizeVariableLengthFieldList
 

Protected Member Functions

SbeMessageversion (SchemaVersion version) noexcept
 
GroupList groups () noexcept
 
GroupList groups () const noexcept
 
template<typename Group >
void initGroup (Group &group, typename Group::EntrySize entrySize) noexcept
 
template<typename Group >
void setupGroup (Group &group, typename Group::Size entryCount, const void *messageTail)
 
template<typename Group >
void constructGroup (Group &group, typename Group::Size entryCount, const void *messageTail)
 
VariableLengthFieldList variableLengthFields () noexcept
 
VariableLengthFieldList variableLengthFields () const noexcept
 
void initHeader (MessageHeader::TemplateId value, MessageHeader::BlockLength blockLength, SchemaId id) noexcept
 
void zeroPaddingBytes (BlockLength offset)
 
void init (MessageHeader::TemplateId value, MessageHeader::BlockLength minimalBlockLength, MessageHeader::BlockLength blockLength, SchemaId id)
 
MessageSize calculateBinarySize (const void *tail) const noexcept
 
template<class Callable , class Owner >
void setVariableLengthField (Callable callable, StrRef value, Owner &owner)
 
template<class Callable , class Owner >
void setVariableLengthField (Callable callable, StrRef value, SchemaVersion since, Owner &owner)
 
template<class Callable , class Owner >
StrRef getVariableLengthField (Callable callable, const Owner &owner) const noexcept
 
template<class Callable , class Owner >
StrRef getVariableLengthField (Callable callable, SchemaVersion since, Owner &owner) const noexcept
 
template<class Callable , class Owner >
void setVariableLengthFieldToNull (Callable callable, Owner &owner) noexcept
 
template<class Group , class Callable , class Owner >
void resetGroup (Callable callable, Owner &owner) noexcept
 
template<class Callable , class Owner >
void setVariableLengthFieldToNull (Callable callable, SchemaVersion since, Owner &owner) noexcept
 
template<class Group , class Callable , class Owner >
void resetGroup (Callable callable, SchemaVersion since, Owner &owner)
 
template<class Group , class Callable , class Owner >
Group getGroup (Callable callable, Owner &owner) const noexcept
 
template<class Group , class Callable , class Owner >
Group getGroup (Callable callable, SchemaVersion since, Owner &owner) const noexcept
 
template<class Group , class Callable , class Owner >
Group constructGroup (Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
 
template<class Group , class Callable , class Owner >
Group constructGroup (Callable callable, typename Group::Size length, Owner &owner)
 
template<class Group , class Callable , class Owner >
Group setupGroup (Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
 
template<class Group , class Callable , class Owner >
Group setupGroup (Callable callable, typename Group::Size length, Owner &owner)
 
- Protected Member Functions inherited from SbeFields< Messaging::SbeMessage, MessageSize >
 SbeFields ()=default
 
 ~SbeFields ()=default
 
- Protected Member Functions inherited from BinaryBlock< Messaging::SbeMessage, MessageSize >
 BinaryBlock ()=default
 
 ~BinaryBlock ()=default
 
Value ordinary (MessageSizeoffset) const noexcept
 
bool ordinary (Value &value, MessageSizeoffset, NullValue null) const noexcept
 
bool ordinary (Value &value, MessageSizeoffset, NullValue null, SchemaVersion since) const noexcept
 
Enumeration::Enum enumeration (MessageSizeoffset) const noexcept
 
bool enumeration (typename Enumeration::Enum &value, MessageSizeoffset, NullValue null) const noexcept
 
bool enumeration (typename Enumeration::Enum &value, MessageSizeoffset, NullValue null, SchemaVersion since) const noexcept
 
Value decimal (MessageSizeoffset) const noexcept
 
bool decimal (Value &value, MessageSizeoffset, NullValue null) const noexcept
 
bool decimal (Value &value, MessageSizeoffset, NullValue null, SchemaVersion since) const noexcept
 
StrRef fixedStr (MessageSizeoffset) const noexcept
 
bool fixedStr (StrRef &value, MessageSizeoffset) const noexcept
 
bool fixedStr (StrRef &value, MessageSizeoffset, SchemaVersion since) const noexcept
 

Static Protected Member Functions

static constexpr MessageSize getMaxMessageSize () noexcept
 

Detailed Description

Definition at line 1091 of file SbeMessage.h.

Member Typedef Documentation

Length of the message body representing a block of fixed-length fields.

Definition at line 1103 of file SbeMessage.h.

Length of the message binary data.

Definition at line 1100 of file SbeMessage.h.

typedef SbeGroupList<MessageSize> GroupList
protected

Binary group list instantiation.

Definition at line 1268 of file SbeMessage.h.

Binary group list instantiation.

Definition at line 1336 of file SbeMessage.h.

Constructor & Destructor Documentation

SbeMessage ( )
inlinenoexcept

Initializes a blank instance.

Definition at line 1106 of file SbeMessage.h.

SbeMessage ( void *  data,
MessageSize  size,
SchemaVersion  version 
)
inline

Initializes the instance over the given memory block.

Definition at line 1114 of file SbeMessage.h.

SbeMessage ( void *  data,
MessageSize  size 
)
inline

Initializes the instance over the given memory block.

Definition at line 1129 of file SbeMessage.h.

SbeMessage ( void *  data,
MessageSize  size,
NoCheck   
)
inlinenoexcept

Initializes the instance over the given memory block.

Note
Performs no check of the data consistency

Definition at line 1148 of file SbeMessage.h.

Member Function Documentation

const void* binary ( ) const
inlinenoexcept
Returns
SBE-encoded message content.

Definition at line 1197 of file SbeMessage.h.

void* binary ( )
inlinenoexcept
Returns
SBE-encoded message content.

Definition at line 1205 of file SbeMessage.h.

const void* block ( ) const
inlinenoexcept
Returns
the beginning of the message body.

Definition at line 1251 of file SbeMessage.h.

void* block ( )
inlinenoexcept
Returns
the beginning of the message body.

Definition at line 1259 of file SbeMessage.h.

const void* blockEnd ( )
inlinenoexcept

Definition at line 1213 of file SbeMessage.h.

const void* blockEnd ( ) const
inlinenoexcept

Definition at line 1221 of file SbeMessage.h.

BlockLength blockLength ( ) const
inlinenoexcept
Returns
the size of the message body in bytes.

Definition at line 1243 of file SbeMessage.h.

void* body ( )
inlinenoexcept
Returns
the beginning of the message body.

Definition at line 1235 of file SbeMessage.h.

MessageSize bufferSize ( ) const
inlinenoexcept
Returns
the size of the message buffer.

Definition at line 1229 of file SbeMessage.h.

MessageSize calculateBinarySize ( const void *  tail) const
inlineprotectednoexcept

Definition at line 1404 of file SbeMessage.h.

void clear ( )
inlinenoexcept

Blank the instance.

Definition at line 1160 of file SbeMessage.h.

void constructGroup ( Group &  group,
typename Group::Size  entryCount,
const void *  messageTail 
)
inlineprotected

Initializes the group header, sets all optional fields to null.

Definition at line 1328 of file SbeMessage.h.

Group constructGroup ( Callable  callable,
typename Group::Size  length,
SchemaVersion  since,
Owner &  owner 
)
inlineprotected

Creates a repeating group with the given number of entries, sets all optional fields of the group entries to null.

Definition at line 1514 of file SbeMessage.h.

Group constructGroup ( Callable  callable,
typename Group::Size  length,
Owner &  owner 
)
inlineprotected

Creates a repeating group with the given number of entries, sets all optional fields of the group entries to null.

Definition at line 1524 of file SbeMessage.h.

Group getGroup ( Callable  callable,
Owner &  owner 
) const
inlineprotectednoexcept
Returns
the repeating group.

Definition at line 1497 of file SbeMessage.h.

Group getGroup ( Callable  callable,
SchemaVersion  since,
Owner &  owner 
) const
inlineprotectednoexcept
Returns
the repeating group.

Definition at line 1504 of file SbeMessage.h.

static constexpr MessageSize getMaxMessageSize ( )
inlinestaticprotectednoexcept

Maximal message size.

Definition at line 1558 of file SbeMessage.h.

StrRef getVariableLengthField ( Callable  callable,
const Owner &  owner 
) const
inlineprotectednoexcept
Returns
the value of the variable length field.

Definition at line 1440 of file SbeMessage.h.

StrRef getVariableLengthField ( Callable  callable,
SchemaVersion  since,
Owner &  owner 
) const
inlineprotectednoexcept
Returns
the value of the variable length field.

Definition at line 1448 of file SbeMessage.h.

GroupList groups ( )
inlineprotectednoexcept
Returns
the list of repeating groups

Definition at line 1282 of file SbeMessage.h.

GroupList groups ( ) const
inlineprotectednoexcept
Returns
the list of repeating groups

Definition at line 1295 of file SbeMessage.h.

void init ( MessageHeader::TemplateId  value,
MessageHeader::BlockLength  minimalBlockLength,
MessageHeader::BlockLength  blockLength,
SchemaId  id 
)
inlineprotected

Definition at line 1387 of file SbeMessage.h.

void initGroup ( Group &  group,
typename Group::EntrySize  entrySize 
)
inlineprotectednoexcept

Resets the group to the initial state.

Definition at line 1309 of file SbeMessage.h.

void initHeader ( MessageHeader::TemplateId  value,
MessageHeader::BlockLength  blockLength,
SchemaId  id 
)
inlineprotectednoexcept

Definition at line 1365 of file SbeMessage.h.

void resetGroup ( Callable  callable,
Owner &  owner 
)
inlineprotectednoexcept

Sets the group to the initial state.

Definition at line 1466 of file SbeMessage.h.

void resetGroup ( Callable  callable,
SchemaVersion  since,
Owner &  owner 
)
inlineprotected

Resets the repeating group.

Definition at line 1487 of file SbeMessage.h.

SchemaId schemaId ( ) const
inlinenoexcept
Returns
SBE Schema ID.

Definition at line 1189 of file SbeMessage.h.

void setupGroup ( Group &  group,
typename Group::Size  entryCount,
const void *  messageTail 
)
inlineprotected

Initializes the group header.

Definition at line 1318 of file SbeMessage.h.

Group setupGroup ( Callable  callable,
typename Group::Size  length,
SchemaVersion  since,
Owner &  owner 
)
inlineprotected

Setups the repeating group with the given number of entries.

Definition at line 1535 of file SbeMessage.h.

Group setupGroup ( Callable  callable,
typename Group::Size  length,
Owner &  owner 
)
inlineprotected

Setups the repeating group with the given number of entries.

Definition at line 1545 of file SbeMessage.h.

void setVariableLengthField ( Callable  callable,
StrRef  value,
Owner &  owner 
)
inlineprotected

Sets the value of the variable length field.

Definition at line 1423 of file SbeMessage.h.

void setVariableLengthField ( Callable  callable,
StrRef  value,
SchemaVersion  since,
Owner &  owner 
)
inlineprotected

Sets the value of the variable length field.

Definition at line 1430 of file SbeMessage.h.

void setVariableLengthFieldToNull ( Callable  callable,
Owner &  owner 
)
inlineprotectednoexcept

Resets the variable length field.

Definition at line 1458 of file SbeMessage.h.

void setVariableLengthFieldToNull ( Callable  callable,
SchemaVersion  since,
Owner &  owner 
)
inlineprotectednoexcept

Sets the variable length field to null.

Definition at line 1477 of file SbeMessage.h.

MessageTemplateId templateId ( ) const
inlinenoexcept
Returns
SBE Template identifier.

Definition at line 1173 of file SbeMessage.h.

bool valid ( ) const
inlinenoexcept
Returns
true if the instance refers to a valid message, otherwise - false.

Definition at line 1167 of file SbeMessage.h.

VariableLengthFieldList variableLengthFields ( )
inlineprotectednoexcept
Returns
the list of variable-length fields.

Definition at line 1340 of file SbeMessage.h.

VariableLengthFieldList variableLengthFields ( ) const
inlineprotectednoexcept
Returns
the list of variable-length fields.

Definition at line 1353 of file SbeMessage.h.

SchemaVersion version ( ) const
inlinenoexcept
Returns
SBE Schema version.

Definition at line 1181 of file SbeMessage.h.

SbeMessage& version ( SchemaVersion  version)
inlineprotectednoexcept

Sets the SBE Schema version.

Definition at line 1271 of file SbeMessage.h.

void zeroPaddingBytes ( BlockLength  offset)
inlineprotected

If specified, the extra space is padded at the end of each entry and should be set to zeroes by encoders.

Definition at line 1376 of file SbeMessage.h.


The documentation for this class was generated from the following file: