Versão atual 13-12-2013.

Dependencies:   EthernetInterface mbed-rtos mbed

Codes/TelnetCommands/telnet_help.cpp

Committer:
rebonatto
Date:
2013-12-13
Revision:
0:65c41a68b49a

File content as of revision 0:65c41a68b49a:


#include "TelnetServer.h"


char *header_msg_help = "This is a list of available commands:\r\n\r\n";

int TelnetServer::HelpCommand(TCPSocketConnection *conn, char ** argv,int argc)
{
    printf("Entering help command...\n");
    
    conn->send(header_msg_help,strlen(header_msg_help));
    
    int i;
    for(i=0;(unsigned int)cmds[i].pfn != 0;i++)
    {
        
        Thread::wait(20);
        conn->send(cmds[i].command_name,strlen(cmds[i].command_name));
        
        //printf("cmd=%s\n",cmds[i].command_name);        
        conn->send("\r\n",2);
    }

    return 0;
}