| 1 | |
|---|
| 2 | <!DOCTYPE html |
|---|
| 3 | PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|---|
| 4 | <html> |
|---|
| 5 | <head> |
|---|
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|---|
| 7 | |
|---|
| 8 | <!-- |
|---|
| 9 | This HTML is auto-generated from an M-file. |
|---|
| 10 | To make changes, update the M-file and republish this document. |
|---|
| 11 | --> |
|---|
| 12 | <title>checkStatusByte</title> |
|---|
| 13 | <meta name="generator" content="MATLAB 7.8"> |
|---|
| 14 | <meta name="date" content="2009-07-20"> |
|---|
| 15 | <meta name="m-file" content="script_checkStatusByte"> |
|---|
| 16 | <link type="text/css" rel="stylesheet" href="../../style.css"> |
|---|
| 17 | </head> |
|---|
| 18 | <body> |
|---|
| 19 | <p class="header">RWTH - Mindstorms NXT Toolbox</p> |
|---|
| 20 | <div class="content"> |
|---|
| 21 | <h1>checkStatusByte</h1> |
|---|
| 22 | <!--introduction--> |
|---|
| 23 | <p>Interpretes the status byte of a return package and creates an error message</p> |
|---|
| 24 | <!--/introduction--> |
|---|
| 25 | <h2>Contents</h2> |
|---|
| 26 | <div> |
|---|
| 27 | <ul> |
|---|
| 28 | <li><a href="#2">Syntax</a></li> |
|---|
| 29 | <li><a href="#4">Description</a></li> |
|---|
| 30 | <li><a href="#6">Example</a></li> |
|---|
| 31 | <li><a href="#8">See also</a></li> |
|---|
| 32 | <li><a href="#10">Signature</a></li> |
|---|
| 33 | </ul> |
|---|
| 34 | </div> |
|---|
| 35 | <h2>Syntax<a name="2"></a></h2> |
|---|
| 36 | <p><tt>[flag err_message] = checkStatusByte(response)</tt></p> |
|---|
| 37 | <h2>Description<a name="4"></a></h2> |
|---|
| 38 | <p><tt>[flag err_message] = checkStatusByte(response)</tt> interpretes the <tt>response</tt> byte (not hexadecimal). The return value <tt>flag</tt> indicates wether an error has occured (<tt>true</tt> = error, <tt>false</tt> = success). The string value <tt>err_message</tt> contains the error message (or '' in case of success). |
|---|
| 39 | </p> |
|---|
| 40 | <h2>Example<a name="6"></a></h2><pre class="codeinput"> [status SleepTimeLimit] = NXT_SendKeepAlive(<span class="string">'reply'</span>); |
|---|
| 41 | [err errmsg] = checkStatusByte(status); |
|---|
| 42 | </pre><h2>See also<a name="8"></a></h2> |
|---|
| 43 | <p><a href="COM_CollectPacket.html">COM_CollectPacket</a>, <a href="NXT_LSGetStatus.html">NXT_LSGetStatus</a>, </p> |
|---|
| 44 | <h2>Signature<a name="10"></a></h2> |
|---|
| 45 | <div> |
|---|
| 46 | <ul> |
|---|
| 47 | <li><b>Author:</b> Linus Atorf (see AUTHORS) |
|---|
| 48 | </li> |
|---|
| 49 | <li><b>Date:</b> 2007/10/15 |
|---|
| 50 | </li> |
|---|
| 51 | <li><b>Copyright:</b> 2007-2009, RWTH Aachen University |
|---|
| 52 | </li> |
|---|
| 53 | </ul> |
|---|
| 54 | </div> |
|---|
| 55 | <p class="footer"><br> |
|---|
| 56 | Published with wg_publish; V1.0<br></p> |
|---|
| 57 | </div> |
|---|
| 58 | <!-- |
|---|
| 59 | ##### SOURCE BEGIN ##### |
|---|
| 60 | %% checkStatusByte |
|---|
| 61 | % Interpretes the status byte of a return package and creates an error message |
|---|
| 62 | %% |
|---|
| 63 | %% Syntax |
|---|
| 64 | % |[flag err_message] = checkStatusByte(response)| |
|---|
| 65 | %% |
|---|
| 66 | %% Description |
|---|
| 67 | % |[flag err_message] = checkStatusByte(response)| interpretes the |response| byte (not |
|---|
| 68 | % hexadecimal). The return value |flag| indicates wether an error has occured |
|---|
| 69 | % (|true| = error, |false| = success). The string value |err_message| contains |
|---|
| 70 | % the error message (or '' in case of success). |
|---|
| 71 | %% |
|---|
| 72 | %% Example |
|---|
| 73 | [status SleepTimeLimit] = NXT_SendKeepAlive('reply'); |
|---|
| 74 | [err errmsg] = checkStatusByte(status); |
|---|
| 75 | %% |
|---|
| 76 | %% See also |
|---|
| 77 | % COM_CollectPacket, NXT_LSGetStatus |
|---|
| 78 | %% |
|---|
| 79 | %% Signature |
|---|
| 80 | %% |
|---|
| 81 | % * *Author:* Linus Atorf (see AUTHORS) |
|---|
| 82 | % * *Date:* 2007/10/15 |
|---|
| 83 | % * *Copyright:* 2007-2009, RWTH Aachen University |
|---|
| 84 | % |
|---|
| 85 | |
|---|
| 86 | ##### SOURCE END ##### |
|---|
| 87 | --> |
|---|
| 88 | </body> |
|---|
| 89 | </html> |
|---|