Marcelo Rebonatto / Mbed 2 deprecated PMED_Tempo

Dependencies:   EthernetInterface mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers telnet_help.cpp Source File

telnet_help.cpp

00001 
00002 #include "TelnetServer.h"
00003 
00004 
00005 char *header_msg_help = "This is a list of available commands:\r\n\r\n";
00006 
00007 int TelnetServer::HelpCommand(TCPSocketConnection *conn, char ** argv,int argc)
00008 {
00009     printf("Entering help command...\n");
00010     
00011     conn->send(header_msg_help,strlen(header_msg_help));
00012     
00013     int i;
00014     for(i=0;(unsigned int)cmds[i].pfn != 0;i++)
00015     {
00016         
00017         Thread::wait(20);
00018         conn->send(cmds[i].command_name,strlen(cmds[i].command_name));
00019         
00020         //printf("cmd=%s\n",cmds[i].command_name);        
00021         conn->send("\r\n",2);
00022     }
00023 
00024     return 0;
00025 }