OnixS C++ ICE Binary Order Entry Handler 1.0.0
API Documentation
Loading...
Searching...
No Matches
SbeMessage Class Reference

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
 operator bool () const noexcept
MessageTemplateId templateId () const noexcept
SchemaVersion version () const noexcept
SchemaId schemaId () const noexcept
SequenceId sequenceId () const noexcept
SbeMessagesequenceId (SequenceId value) noexcept
Timestamp sendTime () const noexcept
SbeMessagesendTime (Timestamp value) noexcept
HeaderFlags headerFlags () const noexcept
SbeMessageheaderFlags (HeaderFlags value) 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 >
ONIXS_ICEBOE_FORCEINLINE Messaging::SbeMessagecontainer () noexcept
void zeroPaddingBytes (MessageSize offset) noexcept
ONIXS_ICEBOE_FORCEINLINE void setOrdinary (MessageSize offset, FieldValue value) noexcept
ONIXS_ICEBOE_FORCEINLINE void setEnumeration (MessageSize offset, Enumeration value) noexcept
ONIXS_ICEBOE_FORCEINLINE void setFixedStr (MessageSize offset, StrRef value) noexcept

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)
template<typename DATA>
void setVarDataField (DATA &data, StrRef value, const void *oldMessageTail)
VariableLengthFieldList variableLengthFields () noexcept
VariableLengthFieldList variableLengthFields () const noexcept
void init (MessageHeader::TemplateId value, MessageHeader::BlockLength minimalBlockLength, MessageHeader::BlockLength blockLength, SchemaId id) noexcept
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>
ONIXS_ICEBOE_FORCEINLINE Group getGroup (Callable callable, Owner &owner) const noexcept
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group getGroup (Callable callable, SchemaVersion since, Owner &owner) const noexcept
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group constructGroup (Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE 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
ONIXS_ICEBOE_FORCEINLINE Value ordinary (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE Enumeration enumeration (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE StrRef fixedStr (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE Value decimal (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE std::enable_if<!isComposite< typenameNullValue::Value >::value, SbeOptionalConverted< decltype(std::declval< Callable >()(std::declval< typenameArgType< Callable >::type >()))> >::type convertible (MessageSize offset, OptionalTag) const noexcept(noexcept(Callable::Nothrow))
Protected Member Functions inherited from BinaryBlockBase
 ~BinaryBlockBase ()=default

Static Protected Member Functions

static constexpr MessageSize getMaxMessageSize () noexcept

Detailed Description

Definition at line 1172 of file SbeMessage.h.

Member Typedef Documentation

◆ BlockLength

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

Definition at line 1184 of file SbeMessage.h.

◆ EncodedLength

Length of the message binary data.

Definition at line 1181 of file SbeMessage.h.

◆ GroupList

typedef SbeGroupList<MessageSize> GroupList
protected

Binary group list instantiation.

Definition at line 1409 of file SbeMessage.h.

◆ VariableLengthFieldList

Binary group list instantiation.

Definition at line 1499 of file SbeMessage.h.

Constructor & Destructor Documentation

◆ SbeMessage() [1/4]

SbeMessage ( )
inlinenoexcept

Initializes a blank instance.

Definition at line 1187 of file SbeMessage.h.

◆ SbeMessage() [2/4]

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

Initializes the instance over the given memory block.

Definition at line 1195 of file SbeMessage.h.

◆ SbeMessage() [3/4]

SbeMessage ( void * data,
MessageSize size )
inline

Initializes the instance over the given memory block.

Definition at line 1210 of file SbeMessage.h.

◆ SbeMessage() [4/4]

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 1229 of file SbeMessage.h.

Member Function Documentation

◆ binary() [1/2]

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

Definition at line 1338 of file SbeMessage.h.

◆ binary() [2/2]

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

Definition at line 1346 of file SbeMessage.h.

◆ block() [1/2]

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

Definition at line 1392 of file SbeMessage.h.

◆ block() [2/2]

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

Definition at line 1400 of file SbeMessage.h.

◆ blockEnd() [1/2]

const void * blockEnd ( ) const
inlinenoexcept

Definition at line 1362 of file SbeMessage.h.

◆ blockEnd() [2/2]

const void * blockEnd ( )
inlinenoexcept

Definition at line 1354 of file SbeMessage.h.

◆ blockLength()

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

Definition at line 1384 of file SbeMessage.h.

◆ body()

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

Definition at line 1376 of file SbeMessage.h.

◆ bufferSize()

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

Definition at line 1370 of file SbeMessage.h.

◆ calculateBinarySize()

MessageSize calculateBinarySize ( const void * tail) const
inlineprotectednoexcept

Definition at line 1548 of file SbeMessage.h.

◆ clear()

void clear ( )
inlinenoexcept

Blank the instance.

Definition at line 1241 of file SbeMessage.h.

◆ constructGroup() [1/3]

template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE 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 1673 of file SbeMessage.h.

◆ constructGroup() [2/3]

template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE 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 1662 of file SbeMessage.h.

◆ constructGroup() [3/3]

template<typename Group>
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 1469 of file SbeMessage.h.

◆ getGroup() [1/2]

template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group getGroup ( Callable callable,
Owner & owner ) const
inlineprotectednoexcept
Returns
the repeating group.

Definition at line 1642 of file SbeMessage.h.

◆ getGroup() [2/2]

template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group getGroup ( Callable callable,
SchemaVersion since,
Owner & owner ) const
inlineprotectednoexcept
Returns
the repeating group.

Definition at line 1651 of file SbeMessage.h.

◆ getMaxMessageSize()

constexpr MessageSize getMaxMessageSize ( )
inlinestaticconstexprprotectednoexcept

Maximal message size.

Definition at line 1707 of file SbeMessage.h.

◆ getVariableLengthField() [1/2]

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

Definition at line 1584 of file SbeMessage.h.

◆ getVariableLengthField() [2/2]

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

Definition at line 1592 of file SbeMessage.h.

◆ groups() [1/2]

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

Definition at line 1436 of file SbeMessage.h.

◆ groups() [2/2]

GroupList groups ( )
inlineprotectednoexcept
Returns
the list of repeating groups

Definition at line 1423 of file SbeMessage.h.

◆ headerFlags() [1/2]

HeaderFlags headerFlags ( ) const
inlinenoexcept
Returns
Send Time.

Definition at line 1320 of file SbeMessage.h.

◆ headerFlags() [2/2]

SbeMessage & headerFlags ( HeaderFlags value)
inlinenoexcept

Sets Send Time.

Definition at line 1328 of file SbeMessage.h.

◆ init()

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

Definition at line 1528 of file SbeMessage.h.

◆ initGroup()

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

Resets the group to the initial state.

Definition at line 1450 of file SbeMessage.h.

◆ operator bool()

operator bool ( ) const
inlineexplicitnoexcept

Definition at line 1253 of file SbeMessage.h.

◆ resetGroup() [1/2]

template<class Group, class Callable, class Owner>
void resetGroup ( Callable callable,
Owner & owner )
inlineprotectednoexcept

Sets the group to the initial state.

Definition at line 1610 of file SbeMessage.h.

◆ resetGroup() [2/2]

template<class Group, class Callable, class Owner>
void resetGroup ( Callable callable,
SchemaVersion since,
Owner & owner )
inlineprotected

Resets the repeating group.

Definition at line 1631 of file SbeMessage.h.

◆ schemaId()

SchemaId schemaId ( ) const
inlinenoexcept
Returns
SBE Schema ID.

Definition at line 1275 of file SbeMessage.h.

◆ sendTime() [1/2]

Timestamp sendTime ( ) const
inlinenoexcept
Returns
Send Time.

Definition at line 1301 of file SbeMessage.h.

◆ sendTime() [2/2]

SbeMessage & sendTime ( Timestamp value)
inlinenoexcept

Sets Send Time.

Definition at line 1310 of file SbeMessage.h.

◆ sequenceId() [1/2]

SequenceId sequenceId ( ) const
inlinenoexcept
Returns
Sequence ID.

Definition at line 1283 of file SbeMessage.h.

◆ sequenceId() [2/2]

SbeMessage & sequenceId ( SequenceId value)
inlinenoexcept

Sets Sequence ID.

Definition at line 1291 of file SbeMessage.h.

◆ setupGroup() [1/3]

template<class Group, class Callable, class Owner>
Group setupGroup ( Callable callable,
typename Group::Size length,
Owner & owner )
inlineprotected

Setups the repeating group with the given number of entries.

Definition at line 1694 of file SbeMessage.h.

◆ setupGroup() [2/3]

template<class Group, class Callable, class Owner>
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 1684 of file SbeMessage.h.

◆ setupGroup() [3/3]

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

Initializes the group header.

Definition at line 1459 of file SbeMessage.h.

◆ setVarDataField()

template<typename DATA>
void setVarDataField ( DATA & data,
StrRef value,
const void * oldMessageTail )
inlineprotected

Sets the variable length field value.

Definition at line 1478 of file SbeMessage.h.

◆ setVariableLengthField() [1/2]

template<class Callable, class Owner>
void setVariableLengthField ( Callable callable,
StrRef value,
Owner & owner )
inlineprotected

Sets the value of the variable length field.

Definition at line 1567 of file SbeMessage.h.

◆ setVariableLengthField() [2/2]

template<class Callable, class Owner>
void setVariableLengthField ( Callable callable,
StrRef value,
SchemaVersion since,
Owner & owner )
inlineprotected

Sets the value of the variable length field.

Definition at line 1574 of file SbeMessage.h.

◆ setVariableLengthFieldToNull() [1/2]

template<class Callable, class Owner>
void setVariableLengthFieldToNull ( Callable callable,
Owner & owner )
inlineprotectednoexcept

Resets the variable length field.

Definition at line 1602 of file SbeMessage.h.

◆ setVariableLengthFieldToNull() [2/2]

template<class Callable, class Owner>
void setVariableLengthFieldToNull ( Callable callable,
SchemaVersion since,
Owner & owner )
inlineprotectednoexcept

Sets the variable length field to null.

Definition at line 1621 of file SbeMessage.h.

◆ templateId()

MessageTemplateId templateId ( ) const
inlinenoexcept
Returns
SBE Template identifier.

Definition at line 1259 of file SbeMessage.h.

◆ valid()

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

Definition at line 1248 of file SbeMessage.h.

◆ variableLengthFields() [1/2]

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

Definition at line 1516 of file SbeMessage.h.

◆ variableLengthFields() [2/2]

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

Definition at line 1503 of file SbeMessage.h.

◆ version() [1/2]

SchemaVersion version ( ) const
inlinenoexcept
Returns
SBE Schema version.

Definition at line 1267 of file SbeMessage.h.

◆ version() [2/2]

SbeMessage & version ( SchemaVersion version)
inlineprotectednoexcept

Sets the SBE Schema version.

Definition at line 1412 of file SbeMessage.h.