Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 29c369053a983cc5d8c880dc6e0a2237 > files > 64

libdtn-devel-2.6.0-2mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>DTN Reference Implementation: BlockInfo.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>BlockInfo.h</h1><a href="BlockInfo_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> *    Copyright 2006 Intel Corporation</span>
<a name="l00003"></a>00003 <span class="comment"> * </span>
<a name="l00004"></a>00004 <span class="comment"> *    Licensed under the Apache License, Version 2.0 (the "License");</span>
<a name="l00005"></a>00005 <span class="comment"> *    you may not use this file except in compliance with the License.</span>
<a name="l00006"></a>00006 <span class="comment"> *    You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment"> * </span>
<a name="l00008"></a>00008 <span class="comment"> *        http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment"> * </span>
<a name="l00010"></a>00010 <span class="comment"> *    Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment"> *    distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment"> *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment"> *    See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment"> *    limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _BUNDLEBLOCKINFO_H_</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _BUNDLEBLOCKINFO_H_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;oasys/debug/DebugUtils.h&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;oasys/serialize/Serialize.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;oasys/serialize/SerializableVector.h&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;oasys/util/ScratchBuffer.h&gt;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="BP__Local_8h.html">BP_Local.h</a>"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="bundling_2Dictionary_8h.html">Dictionary.h</a>"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="contacts_2Link_8h.html">contacts/Link.h</a>"</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">namespace </span>dtn {
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">class </span>BlockProcessor;
<a name="l00032"></a>00032 <span class="keyword">class </span>BP_Local;
<a name="l00033"></a>00033 
<a name="l00038"></a><a class="code" href="classdtn_1_1BlockInfo.html">00038</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a> : <span class="keyword">public</span> oasys::SerializableObject {
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00043"></a><a class="code" href="classdtn_1_1BlockInfo.html#369e8412fcff682247168dbc4776ded2">00043</a>     <span class="keyword">typedef</span> oasys::ScratchBuffer&lt;u_char*, 64&gt; <a class="code" href="classdtn_1_1BlockInfo.html#369e8412fcff682247168dbc4776ded2" title="To store the formatted block data, we use a scratch buffer with 64 bytes of static...">DataBuffer</a>;
<a name="l00044"></a>00044     
<a name="l00047"></a>00047     <a class="code" href="classdtn_1_1BlockInfo.html#84b343224645ffe4d8380dc57bacae6d" title="Default constructor assigns the owner and optionally the BlockInfo source (i.e.">BlockInfo</a>(<a class="code" href="classdtn_1_1BlockProcessor.html" title="Base class for the protocol handling of bundle blocks, including the core primary...">BlockProcessor</a>* <a class="code" href="classdtn_1_1BlockInfo.html#bc48fc2f7f543561e26a8a9e32aceda2" title="Accessors.">owner</a>, <span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>* <a class="code" href="classdtn_1_1BlockInfo.html#f11df0a802e40fd503e49ee6580f585d" title="Accessors.">source</a> = NULL);
<a name="l00048"></a>00048 
<a name="l00050"></a>00050     <a class="code" href="classdtn_1_1BlockInfo.html#84b343224645ffe4d8380dc57bacae6d" title="Default constructor assigns the owner and optionally the BlockInfo source (i.e.">BlockInfo</a>(oasys::Builder&amp; builder);
<a name="l00051"></a>00051 
<a name="l00053"></a>00053     <a class="code" href="classdtn_1_1BlockInfo.html#84b343224645ffe4d8380dc57bacae6d" title="Default constructor assigns the owner and optionally the BlockInfo source (i.e.">BlockInfo</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>&amp; bi);
<a name="l00054"></a>00054     
<a name="l00058"></a>00058     <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1BlockInfo.html#c824aebb7f8db8eb40e156caa6675f31" title="Virtual destructor.">~BlockInfo</a>();
<a name="l00059"></a>00059 
<a name="l00063"></a><a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c">00063</a>     <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00064"></a><a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c2b3215ede385d632516efe713ee24058">00064</a>         <a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c2b3215ede385d632516efe713ee24058">LIST_NONE</a>           = 0x00,
<a name="l00065"></a><a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c988069568eb548f51e7c4b8120b6292f">00065</a>         <a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c988069568eb548f51e7c4b8120b6292f">LIST_RECEIVED</a>       = 0x01,
<a name="l00066"></a><a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1cc8b73fa28c81de6bc46fdc065e7b506c">00066</a>         <a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1cc8b73fa28c81de6bc46fdc065e7b506c">LIST_API</a>            = 0x02,
<a name="l00067"></a><a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c5f4db2de95e5346c183001e7a8776179">00067</a>         <a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c5f4db2de95e5346c183001e7a8776179">LIST_EXT</a>            = 0x03,
<a name="l00068"></a><a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c5ece508e6c790c7dce3bbc16a7e9524e">00068</a>         <a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c5ece508e6c790c7dce3bbc16a7e9524e">LIST_XMIT</a>           = 0x04
<a name="l00069"></a>00069     } <a class="code" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c" title="List owner indicator (not transmitted).">list_owner_t</a>;
<a name="l00070"></a>00070     
<a name="l00072"></a><a class="code" href="classdtn_1_1BlockInfo.html#bc48fc2f7f543561e26a8a9e32aceda2">00072</a>     <a class="code" href="classdtn_1_1BlockProcessor.html" title="Base class for the protocol handling of bundle blocks, including the core primary...">BlockProcessor</a>*   <a class="code" href="classdtn_1_1BlockInfo.html#bc48fc2f7f543561e26a8a9e32aceda2" title="Accessors.">owner</a>()<span class="keyword">          const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#8fad44e0a92eb97c8ed535c4e31d5a25" title="Owner of this block.">owner_</a>; }
<a name="l00073"></a><a class="code" href="classdtn_1_1BlockInfo.html#f11df0a802e40fd503e49ee6580f585d">00073</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>*  <a class="code" href="classdtn_1_1BlockInfo.html#f11df0a802e40fd503e49ee6580f585d" title="Accessors.">source</a>()<span class="keyword">         const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#f5c1bdd1458664ea601beb7b638210f9" title="Owner of this block.">source_</a>; }
<a name="l00074"></a><a class="code" href="classdtn_1_1BlockInfo.html#b20777efd3367156feb424643fc089e4">00074</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1EndpointIDVector.html" title="A (serializable) vector of endpoint ids.">EndpointIDVector</a>&amp; <a class="code" href="classdtn_1_1BlockInfo.html#b20777efd3367156feb424643fc089e4" title="Accessors.">eid_list</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#aaf7a797b0b10eae96814b9d795ac6ce" title="List of EIDs used in this block.">eid_list_</a>; }
<a name="l00075"></a><a class="code" href="classdtn_1_1BlockInfo.html#40fee1299938523234d3ae8c80661e22">00075</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html#369e8412fcff682247168dbc4776ded2" title="To store the formatted block data, we use a scratch buffer with 64 bytes of static...">DataBuffer</a>&amp; <a class="code" href="classdtn_1_1BlockInfo.html#40fee1299938523234d3ae8c80661e22" title="Accessors.">contents</a>()<span class="keyword">       const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#d5ee76b260c8db1734b3b39beb500f3b" title="Block contents with length set to the amount currently in the buffer.">contents_</a>; }
<a name="l00076"></a><a class="code" href="classdtn_1_1BlockInfo.html#f0f4b8768d0879f3077f2c4bb067bada">00076</a>     <a class="code" href="classdtn_1_1BP__Local.html" title="Helper class for BlockProcessor local state for a block.">BP_Local</a>*         <a class="code" href="classdtn_1_1BlockInfo.html#f0f4b8768d0879f3077f2c4bb067bada" title="Accessors.">locals</a>()<span class="keyword">         const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#d0aa4b17b10de9959f645734ca058e09" title="Local variable storage for block processor.">locals_</a>.object(); }
<a name="l00077"></a><a class="code" href="classdtn_1_1BlockInfo.html#cb7676dfe53630699317388ad32e8d99">00077</a>     u_int32_t         <a class="code" href="classdtn_1_1BlockInfo.html#cb7676dfe53630699317388ad32e8d99" title="Accessors.">data_length</a>()<span class="keyword">    const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#356b6227453248cdce3cd9506c3bf2f0" title="Length of the block data (w/o preamble).">data_length_</a>; }
<a name="l00078"></a><a class="code" href="classdtn_1_1BlockInfo.html#590c483ae6cc403c5062b8b3acc51ae3">00078</a>     u_int32_t         <a class="code" href="classdtn_1_1BlockInfo.html#590c483ae6cc403c5062b8b3acc51ae3" title="Accessors.">data_offset</a>()<span class="keyword">    const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#82111d5ca78fbe8e6f58919ea6c68c55" title="Offset of first byte of the block data.">data_offset_</a>; }
<a name="l00079"></a><a class="code" href="classdtn_1_1BlockInfo.html#2045184fe07026a47e1226bf7142f89a">00079</a>     u_int32_t         <a class="code" href="classdtn_1_1BlockInfo.html#2045184fe07026a47e1226bf7142f89a" title="Accessors.">full_length</a>()<span class="keyword">    const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classdtn_1_1BlockInfo.html#82111d5ca78fbe8e6f58919ea6c68c55" title="Offset of first byte of the block data.">data_offset_</a> +
<a name="l00080"></a>00080                                                        <a class="code" href="classdtn_1_1BlockInfo.html#356b6227453248cdce3cd9506c3bf2f0" title="Length of the block data (w/o preamble).">data_length_</a>); }
<a name="l00081"></a><a class="code" href="classdtn_1_1BlockInfo.html#0a211825b5545e2e3068766633502c07">00081</a>     u_char*           <a class="code" href="classdtn_1_1BlockInfo.html#0a211825b5545e2e3068766633502c07" title="Accessors.">data</a>()<span class="keyword">           const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classdtn_1_1BlockInfo.html#d5ee76b260c8db1734b3b39beb500f3b" title="Block contents with length set to the amount currently in the buffer.">contents_</a>.buf() +
<a name="l00082"></a>00082                                                        <a class="code" href="classdtn_1_1BlockInfo.html#82111d5ca78fbe8e6f58919ea6c68c55" title="Offset of first byte of the block data.">data_offset_</a>); }
<a name="l00083"></a><a class="code" href="classdtn_1_1BlockInfo.html#a70c73cf28ec51a265dc5ac077c56975">00083</a>     <span class="keywordtype">bool</span>              <a class="code" href="classdtn_1_1BlockInfo.html#a70c73cf28ec51a265dc5ac077c56975" title="Accessors.">complete</a>()<span class="keyword">       const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#6d80afc8049b9bf47dd8ad1bdb08a5b2" title="Whether or not this block is complete.">complete_</a>; }
<a name="l00084"></a><a class="code" href="classdtn_1_1BlockInfo.html#c0719ae2f50f177d8aba41db6e97e4c7">00084</a>     <span class="keywordtype">bool</span>              <a class="code" href="classdtn_1_1BlockInfo.html#c0719ae2f50f177d8aba41db6e97e4c7" title="Accessors.">reloaded</a>()<span class="keyword">       const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfo.html#a305c29eb0eaecc327639c53ef38343e" title="Whether or not this block is reloaded from store (set in reload_post_process of the...">reloaded_</a>; }
<a name="l00085"></a>00085     <span class="keywordtype">bool</span>              <a class="code" href="classdtn_1_1BlockInfo.html#9688c4db3afee01ca64d83029358c387" title="Accessors.">last_block</a>()     <span class="keyword">const</span>;
<a name="l00087"></a>00087 
<a name="l00089"></a><a class="code" href="classdtn_1_1BlockInfo.html#5d1a51033fe06a0a4b0965865127b6a9">00089</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#5d1a51033fe06a0a4b0965865127b6a9" title="Mutating accessors.">set_owner</a>(<a class="code" href="classdtn_1_1BlockProcessor.html" title="Base class for the protocol handling of bundle blocks, including the core primary...">BlockProcessor</a>* o) { <a class="code" href="classdtn_1_1BlockInfo.html#8fad44e0a92eb97c8ed535c4e31d5a25" title="Owner of this block.">owner_</a> = o; }
<a name="l00090"></a><a class="code" href="classdtn_1_1BlockInfo.html#371f09d4cb7cbd6c6cd60a7823f1630a">00090</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#371f09d4cb7cbd6c6cd60a7823f1630a" title="Mutating accessors.">set_eid_list</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1EndpointIDVector.html" title="A (serializable) vector of endpoint ids.">EndpointIDVector</a>&amp; l) { <a class="code" href="classdtn_1_1BlockInfo.html#aaf7a797b0b10eae96814b9d795ac6ce" title="List of EIDs used in this block.">eid_list_</a> = l; }
<a name="l00091"></a><a class="code" href="classdtn_1_1BlockInfo.html#78731d47494fb3e29e818379f627d3e0">00091</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#78731d47494fb3e29e818379f627d3e0" title="Mutating accessors.">set_complete</a>(<span class="keywordtype">bool</span> t)         { <a class="code" href="classdtn_1_1BlockInfo.html#6d80afc8049b9bf47dd8ad1bdb08a5b2" title="Whether or not this block is complete.">complete_</a> = t; }
<a name="l00092"></a><a class="code" href="classdtn_1_1BlockInfo.html#38d215397b046a403f252512227c29a9">00092</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#38d215397b046a403f252512227c29a9" title="Mutating accessors.">set_data_length</a>(u_int32_t l) { <a class="code" href="classdtn_1_1BlockInfo.html#356b6227453248cdce3cd9506c3bf2f0" title="Length of the block data (w/o preamble).">data_length_</a> = l; }
<a name="l00093"></a><a class="code" href="classdtn_1_1BlockInfo.html#67e9f36d2da267e95270a4dd7d0aa65e">00093</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#67e9f36d2da267e95270a4dd7d0aa65e" title="Mutating accessors.">set_data_offset</a>(u_int32_t o) { <a class="code" href="classdtn_1_1BlockInfo.html#82111d5ca78fbe8e6f58919ea6c68c55" title="Offset of first byte of the block data.">data_offset_</a> = o; }
<a name="l00094"></a><a class="code" href="classdtn_1_1BlockInfo.html#2b1a3f8f9c10d722bc4313781aac8e19">00094</a>     <a class="code" href="classdtn_1_1BlockInfo.html#369e8412fcff682247168dbc4776ded2" title="To store the formatted block data, we use a scratch buffer with 64 bytes of static...">DataBuffer</a>* <a class="code" href="classdtn_1_1BlockInfo.html#2b1a3f8f9c10d722bc4313781aac8e19" title="Mutating accessors.">writable_contents</a>()          { <span class="keywordflow">return</span> &amp;<a class="code" href="classdtn_1_1BlockInfo.html#d5ee76b260c8db1734b3b39beb500f3b" title="Block contents with length set to the amount currently in the buffer.">contents_</a>; }
<a name="l00095"></a>00095     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#906e126f23448f7164e4876810743ee9" title="Mutating accessors.">set_locals</a>(<a class="code" href="classdtn_1_1BP__Local.html" title="Helper class for BlockProcessor local state for a block.">BP_Local</a>* l);
<a name="l00096"></a><a class="code" href="classdtn_1_1BlockInfo.html#02abf3898eea4390447bd24aa8c7f35a">00096</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#02abf3898eea4390447bd24aa8c7f35a" title="Mutating accessors.">add_eid</a>(<a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a> e)        { <a class="code" href="classdtn_1_1BlockInfo.html#aaf7a797b0b10eae96814b9d795ac6ce" title="List of EIDs used in this block.">eid_list_</a>.push_back(e); }
<a name="l00097"></a><a class="code" href="classdtn_1_1BlockInfo.html#a0d24ac3331dddcbd70fb9f4cceb086e">00097</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfo.html#a0d24ac3331dddcbd70fb9f4cceb086e" title="Mutating accessors.">set_reloaded</a>(<span class="keywordtype">bool</span> t)         { <a class="code" href="classdtn_1_1BlockInfo.html#a305c29eb0eaecc327639c53ef38343e" title="Whether or not this block is reloaded from store (set in reload_post_process of the...">reloaded_</a> = t; }
<a name="l00099"></a>00099 
<a name="l00102"></a>00102     <span class="keywordtype">int</span>       <a class="code" href="classdtn_1_1BlockInfo.html#46e4157d30528eae60a1cd240e58b495">type</a>()  <span class="keyword">const</span>;
<a name="l00103"></a>00103     u_int64_t <a class="code" href="classdtn_1_1BlockInfo.html#51f21d5cf4aef2550b605ab90961e045">flags</a>() <span class="keyword">const</span>;
<a name="l00104"></a>00104     <span class="keywordtype">void</span>      <a class="code" href="classdtn_1_1BlockInfo.html#6cc59893081b1c4ba43a41c2d39bf3da">set_flag</a>(u_int64_t flag);
<a name="l00106"></a>00106 
<a name="l00108"></a>00108     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BlockInfo.html#00f1ad39f872ce5c78e38a18337facdc" title="Virtual from SerializableObject.">serialize</a>(oasys::SerializeAction* action);
<a name="l00109"></a>00109 
<a name="l00110"></a>00110 <span class="keyword">protected</span>:
<a name="l00111"></a><a class="code" href="classdtn_1_1BlockInfo.html#8fad44e0a92eb97c8ed535c4e31d5a25">00111</a>     <a class="code" href="classdtn_1_1BlockProcessor.html" title="Base class for the protocol handling of bundle blocks, including the core primary...">BlockProcessor</a>*  <a class="code" href="classdtn_1_1BlockInfo.html#8fad44e0a92eb97c8ed535c4e31d5a25" title="Owner of this block.">owner_</a>;       
<a name="l00112"></a><a class="code" href="classdtn_1_1BlockInfo.html#c426efece2d7af2e886a0c8169a7ff80">00112</a>     u_int16_t        <a class="code" href="classdtn_1_1BlockInfo.html#c426efece2d7af2e886a0c8169a7ff80" title="Extracted from owner.">owner_type_</a>;  
<a name="l00113"></a><a class="code" href="classdtn_1_1BlockInfo.html#f5c1bdd1458664ea601beb7b638210f9">00113</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>* <a class="code" href="classdtn_1_1BlockInfo.html#f5c1bdd1458664ea601beb7b638210f9" title="Owner of this block.">source_</a>;      
<a name="l00114"></a><a class="code" href="classdtn_1_1BlockInfo.html#aaf7a797b0b10eae96814b9d795ac6ce">00114</a>     <a class="code" href="classdtn_1_1EndpointIDVector.html" title="A (serializable) vector of endpoint ids.">EndpointIDVector</a> <a class="code" href="classdtn_1_1BlockInfo.html#aaf7a797b0b10eae96814b9d795ac6ce" title="List of EIDs used in this block.">eid_list_</a>;    
<a name="l00115"></a><a class="code" href="classdtn_1_1BlockInfo.html#d5ee76b260c8db1734b3b39beb500f3b">00115</a>     <a class="code" href="classdtn_1_1BlockInfo.html#369e8412fcff682247168dbc4776ded2" title="To store the formatted block data, we use a scratch buffer with 64 bytes of static...">DataBuffer</a>       <a class="code" href="classdtn_1_1BlockInfo.html#d5ee76b260c8db1734b3b39beb500f3b" title="Block contents with length set to the amount currently in the buffer.">contents_</a>;    
<a name="l00116"></a>00116 
<a name="l00117"></a><a class="code" href="classdtn_1_1BlockInfo.html#d0aa4b17b10de9959f645734ca058e09">00117</a>     <a class="code" href="namespacedtn.html#dd64a70f2c903d73d6b3c71403dc363c" title="Typedef for a reference to a BP_Local.">BP_LocalRef</a>      <a class="code" href="classdtn_1_1BlockInfo.html#d0aa4b17b10de9959f645734ca058e09" title="Local variable storage for block processor.">locals_</a>;      
<a name="l00118"></a><a class="code" href="classdtn_1_1BlockInfo.html#356b6227453248cdce3cd9506c3bf2f0">00118</a>     u_int32_t        <a class="code" href="classdtn_1_1BlockInfo.html#356b6227453248cdce3cd9506c3bf2f0" title="Length of the block data (w/o preamble).">data_length_</a>; 
<a name="l00119"></a><a class="code" href="classdtn_1_1BlockInfo.html#82111d5ca78fbe8e6f58919ea6c68c55">00119</a>     u_int32_t        <a class="code" href="classdtn_1_1BlockInfo.html#82111d5ca78fbe8e6f58919ea6c68c55" title="Offset of first byte of the block data.">data_offset_</a>; 
<a name="l00120"></a><a class="code" href="classdtn_1_1BlockInfo.html#6d80afc8049b9bf47dd8ad1bdb08a5b2">00120</a>     <span class="keywordtype">bool</span>             <a class="code" href="classdtn_1_1BlockInfo.html#6d80afc8049b9bf47dd8ad1bdb08a5b2" title="Whether or not this block is complete.">complete_</a>;    
<a name="l00121"></a><a class="code" href="classdtn_1_1BlockInfo.html#a305c29eb0eaecc327639c53ef38343e">00121</a>     <span class="keywordtype">bool</span>             <a class="code" href="classdtn_1_1BlockInfo.html#a305c29eb0eaecc327639c53ef38343e" title="Whether or not this block is reloaded from store (set in reload_post_process of the...">reloaded_</a>;    
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 };
<a name="l00125"></a>00125 
<a name="l00129"></a><a class="code" href="classdtn_1_1BlockInfoVec.html">00129</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a> : <span class="keyword">public</span> oasys::SerializableVector&lt;BlockInfo&gt; {
<a name="l00130"></a>00130 <span class="keyword">public</span>:
<a name="l00134"></a>00134     <a class="code" href="classdtn_1_1BlockInfoVec.html#cb0b3151de41664e851b6cc49ef91bca" title="Default constructor.">BlockInfoVec</a>();
<a name="l00135"></a>00135     
<a name="l00143"></a>00143     <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>* <a class="code" href="classdtn_1_1BlockInfoVec.html#3dd17df5cfc9f0ddac71580724739866" title="Append a block using the given processor and optional source block.">append_block</a>(<a class="code" href="classdtn_1_1BlockProcessor.html" title="Base class for the protocol handling of bundle blocks, including the core primary...">BlockProcessor</a>*  owner,
<a name="l00144"></a>00144                             <span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>* source = NULL);
<a name="l00145"></a>00145 
<a name="l00151"></a>00151     <span class="keyword">const</span> <a class="code" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a>* <a class="code" href="classdtn_1_1BlockInfoVec.html#646316c3b0fb301712bb39fdbfd3207e" title="Find the block for the given type.">find_block</a>(u_int8_t type) <span class="keyword">const</span>;
<a name="l00152"></a>00152     
<a name="l00156"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#6ab6d60e4c8df6ec3b478880d5a33fb3">00156</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1BlockInfoVec.html#6ab6d60e4c8df6ec3b478880d5a33fb3" title="Check if an entry exists in the vector for the given block type.">has_block</a>(u_int8_t type)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfoVec.html#646316c3b0fb301712bb39fdbfd3207e" title="Find the block for the given type.">find_block</a>(type) != NULL; }
<a name="l00157"></a>00157 
<a name="l00161"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#dfd7265c46dba7a323f99a304332506e">00161</a>     <a class="code" href="classdtn_1_1Dictionary.html" title="Simple data structure to handle a dictionary data structure, as specified by the...">Dictionary</a>* <a class="code" href="classdtn_1_1BlockInfoVec.html#dfd7265c46dba7a323f99a304332506e" title="Return the dictionary.">dict</a>()  { <span class="keywordflow">return</span> &amp;<a class="code" href="classdtn_1_1BlockInfoVec.html#5b547731458f337239db7a8540718326" title="Dictionary for this vector of BlockInfo structures.">dict_</a>; }
<a name="l00162"></a>00162 
<a name="l00167"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#a0240a21e45ea3375d91c4f7c03d8a01">00167</a>     u_int32_t         <a class="code" href="classdtn_1_1BlockInfoVec.html#a0240a21e45ea3375d91c4f7c03d8a01" title="Error values stored by processing routines -- accessors.">error_major</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfoVec.html#4922d25c015da6af2708026f95a7d07d" title="Error values stored by processing routines.">error_major_</a>; }
<a name="l00168"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#06a0555965b0b58635b057bd26baf948">00168</a>     u_int32_t         <a class="code" href="classdtn_1_1BlockInfoVec.html#06a0555965b0b58635b057bd26baf948">error_minor</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfoVec.html#389f4e85733d6f22f02570ac4f62b2cd">error_minor_</a>; }
<a name="l00169"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#b5a32250356729e5054a27474edbbe30">00169</a>     u_int32_t         <a class="code" href="classdtn_1_1BlockInfoVec.html#b5a32250356729e5054a27474edbbe30">error_debug</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BlockInfoVec.html#8c09332dd6ee9143e522add0daf4f223">error_debug_</a>; }
<a name="l00170"></a>00170 
<a name="l00175"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#9f3dacebdcc8bd4d170203837f985f13">00175</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfoVec.html#9f3dacebdcc8bd4d170203837f985f13" title="Error values stored by processing routines -- mutating accessors.">set_error_major</a>(u_int32_t e)  { <a class="code" href="classdtn_1_1BlockInfoVec.html#4922d25c015da6af2708026f95a7d07d" title="Error values stored by processing routines.">error_major_</a> = e; }
<a name="l00176"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#afdec56efe7ec49aeb0c15a21dabf08b">00176</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfoVec.html#afdec56efe7ec49aeb0c15a21dabf08b">set_error_minor</a>(u_int32_t e)  { <a class="code" href="classdtn_1_1BlockInfoVec.html#389f4e85733d6f22f02570ac4f62b2cd">error_minor_</a> = e; }
<a name="l00177"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#3b5c8147dc1ce46d48b2ac33eae3a7a0">00177</a>     <span class="keywordtype">void</span>        <a class="code" href="classdtn_1_1BlockInfoVec.html#3b5c8147dc1ce46d48b2ac33eae3a7a0">set_error_debug</a>(u_int32_t e)  { <a class="code" href="classdtn_1_1BlockInfoVec.html#8c09332dd6ee9143e522add0daf4f223">error_debug_</a> = e; }
<a name="l00178"></a>00178 
<a name="l00179"></a>00179 <span class="keyword">protected</span>:
<a name="l00183"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#4922d25c015da6af2708026f95a7d07d">00183</a>     u_int32_t    <a class="code" href="classdtn_1_1BlockInfoVec.html#4922d25c015da6af2708026f95a7d07d" title="Error values stored by processing routines.">error_major_</a>;
<a name="l00184"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#389f4e85733d6f22f02570ac4f62b2cd">00184</a>     u_int32_t    <a class="code" href="classdtn_1_1BlockInfoVec.html#389f4e85733d6f22f02570ac4f62b2cd">error_minor_</a>;
<a name="l00185"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#8c09332dd6ee9143e522add0daf4f223">00185</a>     u_int32_t    <a class="code" href="classdtn_1_1BlockInfoVec.html#8c09332dd6ee9143e522add0daf4f223">error_debug_</a>;
<a name="l00186"></a>00186 
<a name="l00190"></a><a class="code" href="classdtn_1_1BlockInfoVec.html#5b547731458f337239db7a8540718326">00190</a>     <a class="code" href="classdtn_1_1Dictionary.html" title="Simple data structure to handle a dictionary data structure, as specified by the...">Dictionary</a>   <a class="code" href="classdtn_1_1BlockInfoVec.html#5b547731458f337239db7a8540718326" title="Dictionary for this vector of BlockInfo structures.">dict_</a>;
<a name="l00191"></a>00191 
<a name="l00195"></a>00195     <a class="code" href="classdtn_1_1BlockInfoVec.html#65a0cf33cfcee0c0e889be1ca3b72fc3" title="Disable the copy constructor and assignment operator.">NO_ASSIGN_COPY</a>(<a class="code" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a>);
<a name="l00196"></a>00196 };
<a name="l00197"></a>00197 
<a name="l00201"></a><a class="code" href="classdtn_1_1LinkBlockSet.html">00201</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1LinkBlockSet.html" title="A set of BlockInfoVecs, one for each outgoing link.">LinkBlockSet</a> {
<a name="l00202"></a>00202 <span class="keyword">public</span>:
<a name="l00203"></a><a class="code" href="classdtn_1_1LinkBlockSet.html#40db0e68d2f4b44af4fd2f696033715d">00203</a>     <a class="code" href="classdtn_1_1LinkBlockSet.html#40db0e68d2f4b44af4fd2f696033715d">LinkBlockSet</a>(oasys::Lock* lock) : <a class="code" href="classdtn_1_1LinkBlockSet.html#03ad3894ae707a255a517a8b97a54840">lock_</a>(lock) {}
<a name="l00204"></a>00204     
<a name="l00208"></a>00208     <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1LinkBlockSet.html#99eec7de51e25f164c223c4d26c14662" title="Destructor that clears the set.">~LinkBlockSet</a>();
<a name="l00209"></a>00209     
<a name="l00215"></a>00215     <a class="code" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a>* <a class="code" href="classdtn_1_1LinkBlockSet.html#7fd0f75b4caa20c373c532cc8256e86c" title="Create a new BlockInfoVec for the given link.">create_blocks</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>&amp; link);
<a name="l00216"></a>00216     
<a name="l00222"></a>00222     <a class="code" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a>* <a class="code" href="classdtn_1_1LinkBlockSet.html#07658a9543619b3ab3f1493a2dd68e85" title="Find the BlockInfoVec for the given link.">find_blocks</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>&amp; link) <span class="keyword">const</span>;
<a name="l00223"></a>00223     
<a name="l00227"></a>00227     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1LinkBlockSet.html#8657b919c8356da3736c8ced6a740d30" title="Remove the BlockInfoVec for the given link.">delete_blocks</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>&amp; link);
<a name="l00228"></a>00228 
<a name="l00229"></a>00229 <span class="keyword">protected</span>:
<a name="l00237"></a><a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html">00237</a>     <span class="keyword">struct </span><a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html" title="Struct to hold a block list and a link pointer.">Entry</a> {
<a name="l00238"></a>00238         <a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html#bb6cde2ce8deb4dbdb59d8ed541bab72">Entry</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>&amp; link);
<a name="l00239"></a>00239         
<a name="l00240"></a><a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html#c27818df7332f7818f39c7449dcd4411">00240</a>         <a class="code" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a>* <a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html#c27818df7332f7818f39c7449dcd4411">blocks_</a>;
<a name="l00241"></a><a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html#7950a6b64ed534cdb72983b90e1d442b">00241</a>         <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>       <a class="code" href="structdtn_1_1LinkBlockSet_1_1Entry.html#7950a6b64ed534cdb72983b90e1d442b">link_</a>;
<a name="l00242"></a>00242     };
<a name="l00243"></a>00243 
<a name="l00244"></a><a class="code" href="classdtn_1_1LinkBlockSet.html#26accebf3108d6ec2274943b1d9f7d81">00244</a>     <span class="keyword">typedef</span> std::vector&lt;Entry&gt; <a class="code" href="classdtn_1_1LinkBlockSet.html#26accebf3108d6ec2274943b1d9f7d81">Vector</a>;
<a name="l00245"></a><a class="code" href="classdtn_1_1LinkBlockSet.html#1cf5b0283251d47d8d151b46b8453be1">00245</a>     <span class="keyword">typedef</span> std::vector&lt;Entry&gt;::iterator <a class="code" href="classdtn_1_1LinkBlockSet.html#1cf5b0283251d47d8d151b46b8453be1">iterator</a>;
<a name="l00246"></a><a class="code" href="classdtn_1_1LinkBlockSet.html#2eeca6d493fbc4fb7d1b606f97304ebd">00246</a>     <span class="keyword">typedef</span> std::vector&lt;Entry&gt;::const_iterator <a class="code" href="classdtn_1_1LinkBlockSet.html#2eeca6d493fbc4fb7d1b606f97304ebd">const_iterator</a>;
<a name="l00247"></a><a class="code" href="classdtn_1_1LinkBlockSet.html#f78a2862af02b5a200bbddfc24baf177">00247</a>     <a class="code" href="classdtn_1_1LinkBlockSet.html#26accebf3108d6ec2274943b1d9f7d81">Vector</a> <a class="code" href="classdtn_1_1LinkBlockSet.html#f78a2862af02b5a200bbddfc24baf177">entries_</a>;
<a name="l00248"></a><a class="code" href="classdtn_1_1LinkBlockSet.html#03ad3894ae707a255a517a8b97a54840">00248</a>     oasys::Lock* <a class="code" href="classdtn_1_1LinkBlockSet.html#03ad3894ae707a255a517a8b97a54840">lock_</a>;
<a name="l00249"></a>00249 
<a name="l00253"></a>00253     <a class="code" href="classdtn_1_1LinkBlockSet.html#ac2318f685a4f0aa9b56dc67487513c4" title="Disable the copy constructor and assignment operator.">NO_ASSIGN_COPY</a>(<a class="code" href="classdtn_1_1LinkBlockSet.html" title="A set of BlockInfoVecs, one for each outgoing link.">LinkBlockSet</a>);
<a name="l00254"></a>00254 };
<a name="l00255"></a>00255 
<a name="l00256"></a>00256 } <span class="comment">// namespace dtn</span>
<a name="l00257"></a>00257 
<a name="l00258"></a>00258 <span class="preprocessor">#endif </span><span class="comment">/* _BUNDLEBLOCKINFO_H_ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:26:52 2009 for DTN Reference Implementation by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>