AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
agxNet::StructuredMessage Struct Reference

#include <FramePacket.h>

+ Inheritance diagram for agxNet::StructuredMessage:

Public Member Functions

 StructuredMessage ()
 
 StructuredMessage (const agx::String &uri)
 
 StructuredMessage (const agx::String &uri, const agxJson::Value &header, agxData::BinaryData *binarySegment=nullptr)
 
StructuredMessagecreateResponse () const
 
agxData::BinaryDatagetBinarySegment ()
 
const agxData::BinaryDatagetBinarySegment () const
 
agxJson::Value & getHeader ()
 
const agxJson::Value & getHeader () const
 
agx::UInt32 getMessageId () const
 
agx::UInt32 getResponseId () const
 
const agx::StringgetUri () const
 
 PreHeader ()
 
void setBinarySegment (agxData::BinaryData *binarySegment)
 
void setHeader (const agxJson::Value &header)
 
void setResponseId (agx::UInt32 id)
 
void setUri (const agx::String &uri)
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referencedoperator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Static Public Member Functions

static StructuredMessageparse (const agx::UInt8 *data, size_t numBytes, bool copyBinaryData=false)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Public Attributes

agx::UInt32 binarySegmentOffset
 
agx::UInt32 binarySegmentSize
 
agx::UInt32 headerSize
 
agx::UInt32 id
 
agx::UInt32 responseId
 
agx::UInt32 uriSize
 

Static Public Attributes

static const agx::UInt32 BINARY_SEGMENT_ALIGNMENT = 32
 
static const agx::UInt32 STREAM_END_OF_FILE = 0
 

Protected Member Functions

virtual ~StructuredMessage ()
 
void setMessageId (agx::UInt32 id) const
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandlergetDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Definition at line 55 of file FramePacket.h.

Constructor & Destructor Documentation

◆ StructuredMessage() [1/3]

agxNet::StructuredMessage::StructuredMessage ( )

◆ StructuredMessage() [2/3]

agxNet::StructuredMessage::StructuredMessage ( const agx::String uri)

◆ StructuredMessage() [3/3]

agxNet::StructuredMessage::StructuredMessage ( const agx::String uri,
const agxJson::Value &  header,
agxData::BinaryData binarySegment = nullptr 
)

◆ ~StructuredMessage()

virtual agxNet::StructuredMessage::~StructuredMessage ( )
protectedvirtual

Member Function Documentation

◆ createResponse()

StructuredMessage * agxNet::StructuredMessage::createResponse ( ) const

◆ getBinarySegment() [1/2]

agxData::BinaryData * agxNet::StructuredMessage::getBinarySegment ( )

Definition at line 191 of file FramePacket.h.

◆ getBinarySegment() [2/2]

const agxData::BinaryData * agxNet::StructuredMessage::getBinarySegment ( ) const

Definition at line 192 of file FramePacket.h.

◆ getHeader() [1/2]

agxJson::Value & agxNet::StructuredMessage::getHeader ( )

Definition at line 188 of file FramePacket.h.

◆ getHeader() [2/2]

const agxJson::Value & agxNet::StructuredMessage::getHeader ( ) const

Definition at line 189 of file FramePacket.h.

◆ getMessageId()

agx::UInt32 agxNet::StructuredMessage::getMessageId ( ) const
Returns
The ID of this message. Set by the WebSocket that sent the message.

◆ getResponseId()

agx::UInt32 agxNet::StructuredMessage::getResponseId ( ) const
Returns
The ID of the message that this message is a response to.

◆ getUri()

const agx::String & agxNet::StructuredMessage::getUri ( ) const

Definition at line 187 of file FramePacket.h.

◆ parse()

static StructuredMessage * agxNet::StructuredMessage::parse ( const agx::UInt8 data,
size_t  numBytes,
bool  copyBinaryData = false 
)
static

◆ PreHeader()

agxNet::StructuredMessage::PreHeader ( )

◆ setBinarySegment()

void agxNet::StructuredMessage::setBinarySegment ( agxData::BinaryData binarySegment)

◆ setHeader()

void agxNet::StructuredMessage::setHeader ( const agxJson::Value &  header)

◆ setMessageId()

void agxNet::StructuredMessage::setMessageId ( agx::UInt32  id) const
protected

◆ setResponseId()

void agxNet::StructuredMessage::setResponseId ( agx::UInt32  id)

◆ setUri()

void agxNet::StructuredMessage::setUri ( const agx::String uri)

Member Data Documentation

◆ BINARY_SEGMENT_ALIGNMENT

const agx::UInt32 agxNet::StructuredMessage::BINARY_SEGMENT_ALIGNMENT = 32
static

Definition at line 59 of file FramePacket.h.

◆ binarySegmentOffset

agx::UInt32 agxNet::StructuredMessage::binarySegmentOffset

Definition at line 113 of file FramePacket.h.

◆ binarySegmentSize

agx::UInt32 agxNet::StructuredMessage::binarySegmentSize

Definition at line 114 of file FramePacket.h.

◆ headerSize

agx::UInt32 agxNet::StructuredMessage::headerSize

Definition at line 112 of file FramePacket.h.

◆ id

agx::UInt32 agxNet::StructuredMessage::id

Definition at line 109 of file FramePacket.h.

◆ responseId

agx::UInt32 agxNet::StructuredMessage::responseId

Definition at line 110 of file FramePacket.h.

◆ STREAM_END_OF_FILE

const agx::UInt32 agxNet::StructuredMessage::STREAM_END_OF_FILE = 0
static

Definition at line 116 of file FramePacket.h.

◆ uriSize

agx::UInt32 agxNet::StructuredMessage::uriSize

Definition at line 111 of file FramePacket.h.


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