#include <MetadataBlock.h>
Definition at line 35 of file MetadataBlock.h.
Public Member Functions | |
MetadataBlock () | |
MetadataBlock (BlockInfo *block) | |
MetadataBlock (u_int64_t type, u_char *buf, u_int32_t len) | |
MetadataBlock (unsigned int source_id, u_int64_t type, u_char *buf, u_int32_t len) | |
MetadataBlock (oasys::Builder &builder) | |
MetadataBlock (const MetadataBlock ©) | |
~MetadataBlock () | |
unsigned int | id () const |
bool | generated () const |
bool | error () const |
unsigned int | source_id () const |
bool | source () const |
u_int64_t | flags () const |
u_int64_t | ontology () const |
u_char * | metadata () const |
u_int32_t | metadata_len () const |
oasys::Lock * | lock () |
void | set_flags (u_int64_t flags) |
void | set_block_error () |
void | set_ontology (u_int64_t ontology) |
void | set_metadata (u_char *buf, u_int32_t len) |
bool | remove_outgoing_metadata (const LinkRef &link) |
Mark the metadata block for removal from the bundle on the specified outgoing link. | |
bool | modify_outgoing_metadata (const LinkRef &link, u_char *buf, u_int32_t len) |
Modify the metadata block for the specified outgoing link. | |
bool | metadata_removed (const LinkRef &link) |
bool | metadata_modified (const LinkRef &link) |
bool | metadata_modified (const LinkRef &link, u_char **buf, u_int32_t &len) |
void | delete_outgoing_metadata (const LinkRef &link) |
Remove any outgoing metadata state for the specified link. | |
virtual void | serialize (oasys::SerializeAction *action) |
Virtual from SerializableObject. | |
void | operator= (const MetadataBlock ©) |
Static Public Member Functions | |
static unsigned int | get_next_index () |
Private Member Functions | |
OutgoingMetadata * | find_outgoing_metadata (const LinkRef &link) |
bool | has_outgoing_metadata (const LinkRef &link) |
Private Attributes | |
oasys::Mutex | lock_ |
unsigned int | id_ |
unique identifier | |
BlockInfo * | block_ |
corresponding BlockInfo | |
bool | generated_ |
flag that indicates if the metadata was locally generated, and therefore memory allocated to the ontology buf | |
bool | error_ |
flag that indicates if the metadata block was received with errors | |
unsigned int | source_id_ |
bool | source_ |
u_int64_t | flags_ |
u_int64_t | ontology_ |
u_char * | metadata_ |
u_int32_t | metadata_len_ |
std::vector< OutgoingMetadata > | outgoing_metadata_ |
Static Private Attributes | |
static unsigned int | index_ = 0 |
Classes | |
class | OutgoingMetadata |
dtn::MetadataBlock::MetadataBlock | ( | ) | [inline] |
Definition at line 39 of file MetadataBlock.h.
dtn::MetadataBlock::MetadataBlock | ( | BlockInfo * | block | ) | [inline] |
Definition at line 45 of file MetadataBlock.h.
dtn::MetadataBlock::MetadataBlock | ( | u_int64_t | type, | |
u_char * | buf, | |||
u_int32_t | len | |||
) |
dtn::MetadataBlock::MetadataBlock | ( | unsigned int | source_id, | |
u_int64_t | type, | |||
u_char * | buf, | |||
u_int32_t | len | |||
) |
dtn::MetadataBlock::MetadataBlock | ( | oasys::Builder & | builder | ) | [inline] |
Definition at line 56 of file MetadataBlock.h.
dtn::MetadataBlock::MetadataBlock | ( | const MetadataBlock & | copy | ) |
Definition at line 67 of file MetadataBlock.cc.
References ASSERT, generated_, metadata_, and metadata_len_.
dtn::MetadataBlock::~MetadataBlock | ( | ) |
Definition at line 89 of file MetadataBlock.cc.
References generated_, metadata_, metadata_len_, and outgoing_metadata_.
unsigned int dtn::MetadataBlock::id | ( | ) | const [inline] |
bool dtn::MetadataBlock::generated | ( | ) | const [inline] |
bool dtn::MetadataBlock::error | ( | ) | const [inline] |
unsigned int dtn::MetadataBlock::source_id | ( | ) | const [inline] |
bool dtn::MetadataBlock::source | ( | ) | const [inline] |
u_int64_t dtn::MetadataBlock::flags | ( | ) | const [inline] |
u_int64_t dtn::MetadataBlock::ontology | ( | ) | const [inline] |
u_char* dtn::MetadataBlock::metadata | ( | ) | const [inline] |
Definition at line 76 of file MetadataBlock.h.
References metadata_.
Referenced by metadata_modified(), and metadata_removed().
u_int32_t dtn::MetadataBlock::metadata_len | ( | ) | const [inline] |
oasys::Lock* dtn::MetadataBlock::lock | ( | ) | [inline] |
void dtn::MetadataBlock::set_flags | ( | u_int64_t | flags | ) |
Definition at line 101 of file MetadataBlock.cc.
References ASSERT, flags_, and generated_.
Referenced by dtn::APIClient::handle_send().
void dtn::MetadataBlock::set_block_error | ( | ) | [inline] |
void dtn::MetadataBlock::set_ontology | ( | u_int64_t | ontology | ) | [inline] |
void dtn::MetadataBlock::set_metadata | ( | u_char * | buf, | |
u_int32_t | len | |||
) |
Definition at line 109 of file MetadataBlock.cc.
References ASSERT, generated_, metadata_, and metadata_len_.
Mark the metadata block for removal from the bundle on the specified outgoing link.
Definition at line 125 of file MetadataBlock.cc.
References has_outgoing_metadata(), dtn::log, log_err_p, and outgoing_metadata_.
bool dtn::MetadataBlock::modify_outgoing_metadata | ( | const LinkRef & | link, | |
u_char * | buf, | |||
u_int32_t | len | |||
) |
Modify the metadata block for the specified outgoing link.
Definition at line 141 of file MetadataBlock.cc.
References has_outgoing_metadata(), dtn::log, log_err_p, and outgoing_metadata_.
Definition at line 158 of file MetadataBlock.cc.
References find_outgoing_metadata(), metadata(), and dtn::MetadataBlock::OutgoingMetadata::remove().
Definition at line 170 of file MetadataBlock.cc.
References find_outgoing_metadata(), metadata(), and dtn::MetadataBlock::OutgoingMetadata::remove().
Definition at line 181 of file MetadataBlock.cc.
References find_outgoing_metadata(), dtn::MetadataBlock::OutgoingMetadata::metadata(), dtn::MetadataBlock::OutgoingMetadata::metadata_len(), and dtn::MetadataBlock::OutgoingMetadata::remove().
void dtn::MetadataBlock::delete_outgoing_metadata | ( | const LinkRef & | link | ) |
Remove any outgoing metadata state for the specified link.
Definition at line 196 of file MetadataBlock.cc.
References outgoing_metadata_.
virtual void dtn::MetadataBlock::serialize | ( | oasys::SerializeAction * | action | ) | [inline, virtual] |
void dtn::MetadataBlock::operator= | ( | const MetadataBlock & | copy | ) |
Definition at line 209 of file MetadataBlock.cc.
References ASSERT, block_, error_, generated_, id_, metadata_, metadata_len_, ontology_, and outgoing_metadata_.
static unsigned int dtn::MetadataBlock::get_next_index | ( | ) | [inline, static] |
MetadataBlock::OutgoingMetadata * dtn::MetadataBlock::find_outgoing_metadata | ( | const LinkRef & | link | ) | [private] |
Definition at line 242 of file MetadataBlock.cc.
References outgoing_metadata_.
Referenced by has_outgoing_metadata(), metadata_modified(), and metadata_removed().
Definition at line 191 of file MetadataBlock.h.
References find_outgoing_metadata().
Referenced by modify_outgoing_metadata(), and remove_outgoing_metadata().
oasys::Mutex dtn::MetadataBlock::lock_ [private] |
unsigned int dtn::MetadataBlock::id_ [private] |
unique identifier
Definition at line 139 of file MetadataBlock.h.
Referenced by id(), and operator=().
BlockInfo* dtn::MetadataBlock::block_ [private] |
bool dtn::MetadataBlock::generated_ [private] |
flag that indicates if the metadata was locally generated, and therefore memory allocated to the ontology buf
Definition at line 142 of file MetadataBlock.h.
Referenced by generated(), MetadataBlock(), operator=(), set_flags(), set_metadata(), and ~MetadataBlock().
bool dtn::MetadataBlock::error_ [private] |
flag that indicates if the metadata block was received with errors
Definition at line 146 of file MetadataBlock.h.
Referenced by error(), operator=(), and set_block_error().
unsigned int dtn::MetadataBlock::source_id_ [private] |
bool dtn::MetadataBlock::source_ [private] |
u_int64_t dtn::MetadataBlock::flags_ [private] |
u_int64_t dtn::MetadataBlock::ontology_ [private] |
Definition at line 157 of file MetadataBlock.h.
Referenced by ontology(), operator=(), and set_ontology().
u_char* dtn::MetadataBlock::metadata_ [private] |
Definition at line 158 of file MetadataBlock.h.
Referenced by metadata(), MetadataBlock(), operator=(), set_metadata(), and ~MetadataBlock().
u_int32_t dtn::MetadataBlock::metadata_len_ [private] |
Definition at line 159 of file MetadataBlock.h.
Referenced by metadata_len(), MetadataBlock(), operator=(), set_metadata(), and ~MetadataBlock().
std::vector<OutgoingMetadata> dtn::MetadataBlock::outgoing_metadata_ [private] |
Definition at line 188 of file MetadataBlock.h.
Referenced by delete_outgoing_metadata(), find_outgoing_metadata(), modify_outgoing_metadata(), operator=(), remove_outgoing_metadata(), and ~MetadataBlock().
unsigned int dtn::MetadataBlock::index_ = 0 [static, private] |