| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| <head> |
| <title>Target Communication Framework Services - Debug Print</title> |
| </head> |
| |
| <body lang='EN-US'> |
| |
| <h1>Target Communication Framework Services - Debug Print</h1> |
| |
| <ul> |
| <li><a href='#VersionHistory'>Version History</a> |
| <li><a href='#Overview'>Overview</a> |
| <li><a href='#Cmds'>Commands</a> |
| <ul> |
| <li><a href='#CmdOpen'>Open</a> |
| <li><a href='#CmdClose'>Close</a> |
| </ul> |
| <li><a href='#API'>API</a> |
| </ul> |
| |
| <h1>Debug Print Service</h1> |
| |
| <h2><a name='VersionHistory'>Version History</a></h2> |
| |
| <table border=1 cellpadding=8> |
| <tr> |
| <th>Version |
| <th>Date |
| <th>Change |
| <tr> |
| <td>1.0 |
| <td>2011-11-11 |
| <td>Initial |
| </table> |
| |
| <h2><a name='Overview'>Overview</a></h2> |
| |
| <p> |
| The service provides access to "dynamic printf" output stream that is generated by invocations of |
| '$printf' function by the <a href='TCF Service - Expressions.html'>Expressions</a> service on the remote target. |
| </p> |
| <p> |
| The function has same arguments as the C library function int printf(const char * format, ...). |
| While '$printf' is most usefull as a breakpoint action, any debugger expression can call the function. |
| </p> |
| |
| <p>The service uses standard format for error reports, |
| see <a href='TCF Error Report Format.html'>Error Report Format</a>.</p> |
| |
| <h2><a name='Cmds'>Commands</a></h2> |
| |
| <h3><a name='CmdOpen'>Open</a></h3> |
| <pre><b><font face="Courier New" size=2 color=#333399> |
| C • <i><token></i> • DPrintf • open • <i><object: stream properties></i> • |
| </font></b></pre> |
| <p> |
| Open "dynamic printf" stream. |
| If the stream is already open, just return its ID. |
| </p> |
| <p> |
| Stream properties are optional and can be null. No standard stream properties are defined yet. |
| </p> |
| <p>Reply:</p> |
| <pre><b><font face="Courier New" size=2 color=#333399> |
| R • <i><token></i> • <i><error report></i> • <i><string: stream ID></i> • |
| </font></b></pre> |
| <p> |
| Reply contains ID of the stream. |
| The stream is accessible through the <a href='TCF Service - Streams.html'>Streams</a> service. |
| </p> |
| |
| <h3><a name='CmdClose'>Close</a></h3> |
| <pre><b><font face="Courier New" size=2 color=#333399> |
| C • <i><token></i> • DPrintf • close • |
| </font></b></pre> |
| <p> |
| Close "dynamic printf" stream. |
| </p> |
| <p>Reply:</p> |
| <pre><b><font face="Courier New" size=2 color=#333399> |
| R • <i><token></i> • <i><error report></i> • |
| </font></b></pre> |
| |
| <h2><a name='API'>API</a></h2> |
| |
| <pre> |
| <font color=#3F5FBF>/** |
| * DPrintf service provides access to "dynamic printf" output stream that is generated by invocations of |
| * '$printf' function on the remote target. '$printf' is usually used as a breakpoint action. |
| * |
| * <font color=#7F9FBF>@noimplement</font> This interface is not intended to be implemented by clients. |
| */</font> |
| <font color=#7F0055>public interface</font> IDPrintf <font color=#7F0055>extends</font> IService { |
| |
| <font color=#3F5FBF>/** |
| * This service name, as it appears on the wire - a TCF name of the service. |
| */</font> |
| <font color=#7F0055>static final</font> String NAME = "DPrintf"; |
| |
| <font color=#3F5FBF>/** |
| * Open "dynamic printf" stream and get ID of the stream. |
| * The service maintains one such stream per client. |
| * The stream is managed by Streams service. |
| * <font color=#7F9FBF>@param</font> properties - optional stream properties. |
| * <font color=#7F9FBF>@param</font> done - command result call back object. |
| * <font color=#7F9FBF>@return</font> - pending command handle. |
| */</font> |
| IToken open(Map<String,Object>[] properties, DoneCommandOpen done); |
| |
| <font color=#7F0055>interface</font> DoneCommandOpen { |
| <font color=#7F0055>void</font> doneCommandOpen(IToken token, Exception error, String id); |
| } |
| |
| <font color=#3F5FBF>/** |
| * Close "dynamic printf" stream. |
| * Further '$printf' output will be discarded. |
| * <font color=#7F9FBF>@param</font> done - command result call back object. |
| * <font color=#7F9FBF>@return</font> - pending command handle. |
| */</font> |
| IToken close(DoneCommandClose done); |
| |
| <font color=#7F0055>interface</font> DoneCommandClose { |
| <font color=#7F0055>void</font> doneCommandClose(IToken token, Exception error); |
| } |
| } |
| </pre> |
| |
| </body> |
| </html> |