<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>XBee-Arduino: ZBTxRequest Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">XBee-Arduino
   &#160;<span id="projectnumber">0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_z_b_tx_request-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ZBTxRequest Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents a Series 2 TX packet that corresponds to Api Id: ZB_TX_REQUEST.  
 <a href="class_z_b_tx_request.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_x_bee_8h_source.html">XBee.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ZBTxRequest:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_z_b_tx_request.png" usemap="#ZBTxRequest_map" alt=""/>
  <map id="ZBTxRequest_map" name="ZBTxRequest_map">
<area href="class_payload_request.html" title="All TX packets that support payloads extend this class. " alt="PayloadRequest" shape="rect" coords="0,56,102,80"/>
<area href="class_x_bee_request.html" title="Super class of all XBee requests (TX packets) Users should never create an instance of this class; in..." alt="XBeeRequest" shape="rect" coords="0,0,102,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a47d9d87e0ab2e155ff3408acea5dcf7c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47d9d87e0ab2e155ff3408acea5dcf7c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_b_tx_request.html#a47d9d87e0ab2e155ff3408acea5dcf7c">ZBTxRequest</a> (<a class="el" href="class_x_bee_address64.html">XBeeAddress64</a> &amp;addr64, uint8_t *payload, uint8_t payloadLength)</td></tr>
<tr class="memdesc:a47d9d87e0ab2e155ff3408acea5dcf7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a unicast <a class="el" href="class_z_b_tx_request.html" title="Represents a Series 2 TX packet that corresponds to Api Id: ZB_TX_REQUEST. ">ZBTxRequest</a> with the ACK option and DEFAULT_FRAME_ID. <br/></td></tr>
<tr class="separator:a47d9d87e0ab2e155ff3408acea5dcf7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98f109c346e669049697665745605e67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98f109c346e669049697665745605e67"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ZBTxRequest</b> (<a class="el" href="class_x_bee_address64.html">XBeeAddress64</a> &amp;addr64, uint16_t addr16, uint8_t broadcastRadius, uint8_t option, uint8_t *payload, uint8_t payloadLength, uint8_t frameId)</td></tr>
<tr class="separator:a98f109c346e669049697665745605e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a410499f31a049f0bd4bbc8299ec74e24"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_b_tx_request.html#a410499f31a049f0bd4bbc8299ec74e24">ZBTxRequest</a> ()</td></tr>
<tr class="memdesc:a410499f31a049f0bd4bbc8299ec74e24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a default instance of this class.  <a href="#a410499f31a049f0bd4bbc8299ec74e24">More...</a><br/></td></tr>
<tr class="separator:a410499f31a049f0bd4bbc8299ec74e24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbd44bb9801c9cba0c9ea4e87ed8efa5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adbd44bb9801c9cba0c9ea4e87ed8efa5"></a>
<a class="el" href="class_x_bee_address64.html">XBeeAddress64</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getAddress64</b> ()</td></tr>
<tr class="separator:adbd44bb9801c9cba0c9ea4e87ed8efa5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac75b0c6db3b6c9b54c3df2891b267950"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac75b0c6db3b6c9b54c3df2891b267950"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>getAddress16</b> ()</td></tr>
<tr class="separator:ac75b0c6db3b6c9b54c3df2891b267950"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c4a33cab93ff1d18703c8ddd4db4056"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6c4a33cab93ff1d18703c8ddd4db4056"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>getBroadcastRadius</b> ()</td></tr>
<tr class="separator:a6c4a33cab93ff1d18703c8ddd4db4056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b97981c2a07afdeeacff09e479b7d45"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b97981c2a07afdeeacff09e479b7d45"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>getOption</b> ()</td></tr>
<tr class="separator:a4b97981c2a07afdeeacff09e479b7d45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32725cca51a846b716308497d066b7a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32725cca51a846b716308497d066b7a7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setAddress64</b> (<a class="el" href="class_x_bee_address64.html">XBeeAddress64</a> &amp;addr64)</td></tr>
<tr class="separator:a32725cca51a846b716308497d066b7a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1ae1761a27f335d353428de9c986aff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1ae1761a27f335d353428de9c986aff"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setAddress16</b> (uint16_t addr16)</td></tr>
<tr class="separator:aa1ae1761a27f335d353428de9c986aff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d2825234b6d42385998df927d0fe0cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d2825234b6d42385998df927d0fe0cb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setBroadcastRadius</b> (uint8_t broadcastRadius)</td></tr>
<tr class="separator:a2d2825234b6d42385998df927d0fe0cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32b2ea4b2c457396a7463e2add7e14f6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32b2ea4b2c457396a7463e2add7e14f6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setOption</b> (uint8_t option)</td></tr>
<tr class="separator:a32b2ea4b2c457396a7463e2add7e14f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_payload_request"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_payload_request')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_payload_request.html">PayloadRequest</a></td></tr>
<tr class="memitem:a22cc9fd971a1334346560689d7d8c8d5 inherit pub_methods_class_payload_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a22cc9fd971a1334346560689d7d8c8d5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>PayloadRequest</b> (uint8_t apiId, uint8_t frameId, uint8_t *payload, uint8_t payloadLength)</td></tr>
<tr class="separator:a22cc9fd971a1334346560689d7d8c8d5 inherit pub_methods_class_payload_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e2d5757fefda70dfd0c567b3dd0ba39 inherit pub_methods_class_payload_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e2d5757fefda70dfd0c567b3dd0ba39"></a>
uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_payload_request.html#a1e2d5757fefda70dfd0c567b3dd0ba39">getPayload</a> ()</td></tr>
<tr class="memdesc:a1e2d5757fefda70dfd0c567b3dd0ba39 inherit pub_methods_class_payload_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the payload of the packet, if not null. <br/></td></tr>
<tr class="separator:a1e2d5757fefda70dfd0c567b3dd0ba39 inherit pub_methods_class_payload_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9abc1f496a1c457f796207aa8a7567d inherit pub_methods_class_payload_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9abc1f496a1c457f796207aa8a7567d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_payload_request.html#aa9abc1f496a1c457f796207aa8a7567d">setPayload</a> (uint8_t *payloadPtr)</td></tr>
<tr class="memdesc:aa9abc1f496a1c457f796207aa8a7567d inherit pub_methods_class_payload_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the payload array. <br/></td></tr>
<tr class="separator:aa9abc1f496a1c457f796207aa8a7567d inherit pub_methods_class_payload_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb718d069f05611623833437c99893a4 inherit pub_methods_class_payload_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb718d069f05611623833437c99893a4"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_payload_request.html#afb718d069f05611623833437c99893a4">getPayloadLength</a> ()</td></tr>
<tr class="memdesc:afb718d069f05611623833437c99893a4 inherit pub_methods_class_payload_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of the payload array, as specified by the user. <br/></td></tr>
<tr class="separator:afb718d069f05611623833437c99893a4 inherit pub_methods_class_payload_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e86a663ab6299afaa1cf21ad7c2c5c1 inherit pub_methods_class_payload_request"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_payload_request.html#a6e86a663ab6299afaa1cf21ad7c2c5c1">setPayloadLength</a> (uint8_t payloadLength)</td></tr>
<tr class="memdesc:a6e86a663ab6299afaa1cf21ad7c2c5c1 inherit pub_methods_class_payload_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the length of the payload to include in the request.  <a href="#a6e86a663ab6299afaa1cf21ad7c2c5c1">More...</a><br/></td></tr>
<tr class="separator:a6e86a663ab6299afaa1cf21ad7c2c5c1 inherit pub_methods_class_payload_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_x_bee_request"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_x_bee_request')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_x_bee_request.html">XBeeRequest</a></td></tr>
<tr class="memitem:af80fd559cab746ab8573087cddda71a2 inherit pub_methods_class_x_bee_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af80fd559cab746ab8573087cddda71a2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_bee_request.html#af80fd559cab746ab8573087cddda71a2">XBeeRequest</a> (uint8_t apiId, uint8_t frameId)</td></tr>
<tr class="memdesc:af80fd559cab746ab8573087cddda71a2 inherit pub_methods_class_x_bee_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor TODO make protected. <br/></td></tr>
<tr class="separator:af80fd559cab746ab8573087cddda71a2 inherit pub_methods_class_x_bee_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed1724c11e710217807c971e40105c86 inherit pub_methods_class_x_bee_request"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_bee_request.html#aed1724c11e710217807c971e40105c86">setFrameId</a> (uint8_t frameId)</td></tr>
<tr class="memdesc:aed1724c11e710217807c971e40105c86 inherit pub_methods_class_x_bee_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the frame id.  <a href="#aed1724c11e710217807c971e40105c86">More...</a><br/></td></tr>
<tr class="separator:aed1724c11e710217807c971e40105c86 inherit pub_methods_class_x_bee_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20394c7ea4666224c50bef25cc0cd836 inherit pub_methods_class_x_bee_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a20394c7ea4666224c50bef25cc0cd836"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_bee_request.html#a20394c7ea4666224c50bef25cc0cd836">getFrameId</a> ()</td></tr>
<tr class="memdesc:a20394c7ea4666224c50bef25cc0cd836 inherit pub_methods_class_x_bee_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the frame id. <br/></td></tr>
<tr class="separator:a20394c7ea4666224c50bef25cc0cd836 inherit pub_methods_class_x_bee_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a746d0373c9fb6ed0ff8b7e04f5fb12c9 inherit pub_methods_class_x_bee_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a746d0373c9fb6ed0ff8b7e04f5fb12c9"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_bee_request.html#a746d0373c9fb6ed0ff8b7e04f5fb12c9">getApiId</a> ()</td></tr>
<tr class="memdesc:a746d0373c9fb6ed0ff8b7e04f5fb12c9 inherit pub_methods_class_x_bee_request"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the API id. <br/></td></tr>
<tr class="separator:a746d0373c9fb6ed0ff8b7e04f5fb12c9 inherit pub_methods_class_x_bee_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ac81e09dfbf7aefbdf7f8b4838b643c5c"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_b_tx_request.html#ac81e09dfbf7aefbdf7f8b4838b643c5c">getFrameData</a> (uint8_t pos)</td></tr>
<tr class="memdesc:ac81e09dfbf7aefbdf7f8b4838b643c5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starting after the frame id (pos = 0) and up to but not including the checksum Note: Unlike Digi's definition of the frame data, this does not start with the API ID.  <a href="#ac81e09dfbf7aefbdf7f8b4838b643c5c">More...</a><br/></td></tr>
<tr class="separator:ac81e09dfbf7aefbdf7f8b4838b643c5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6914c1f556981a0f863c57c57d053b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e6914c1f556981a0f863c57c57d053b"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_z_b_tx_request.html#a8e6914c1f556981a0f863c57c57d053b">getFrameDataLength</a> ()</td></tr>
<tr class="memdesc:a8e6914c1f556981a0f863c57c57d053b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the api frame (not including frame id or api id or checksum). <br/></td></tr>
<tr class="separator:a8e6914c1f556981a0f863c57c57d053b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_x_bee_request"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_x_bee_request')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_x_bee_request.html">XBeeRequest</a></td></tr>
<tr class="memitem:aee756672e79dbb05358187cb53f61b1a inherit pro_methods_class_x_bee_request"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee756672e79dbb05358187cb53f61b1a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setApiId</b> (uint8_t apiId)</td></tr>
<tr class="separator:aee756672e79dbb05358187cb53f61b1a inherit pro_methods_class_x_bee_request"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a Series 2 TX packet that corresponds to Api Id: ZB_TX_REQUEST. </p>
<p>Be careful not to send a data array larger than the max packet size of your radio. This class does not perform any validation of packet size and there will be no indication if the packet is too large, other than you will not get a TX Status response. The datasheet says 72 bytes is the maximum for ZNet firmware and ZB Pro firmware provides the ATNP command to get the max supported payload size. This command is useful since the maximum payload size varies according to certain settings, such as encryption. ZB Pro firmware provides a PAYLOAD_TOO_LARGE that is returned if payload size exceeds the maximum. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a410499f31a049f0bd4bbc8299ec74e24"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZBTxRequest::ZBTxRequest </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a default instance of this class. </p>
<p>At a minimum you must specify a payload, payload length and a destination address before sending this request. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac81e09dfbf7aefbdf7f8b4838b643c5c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ZBTxRequest::getFrameData </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Starting after the frame id (pos = 0) and up to but not including the checksum Note: Unlike Digi's definition of the frame data, this does not start with the API ID. </p>
<p>The reason for this is the API ID and Frame ID are common to all requests, whereas my definition of frame data is only the API specific data. </p>

<p>Implements <a class="el" href="class_x_bee_request.html#ad5b998cd95a570bdaa4d74c6c8790d94">XBeeRequest</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_x_bee_8h_source.html">XBee.h</a></li>
<li>XBee.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Feb 1 2014 18:47:30 for XBee-Arduino by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
