Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface mbed-rtos mbed
Codes/TelnetCommands/telnet_listparam.cpp@0:c64e1194230b, 2014-07-09 (annotated)
- Committer:
- rebonatto
- Date:
- Wed Jul 09 21:16:23 2014 +0000
- Revision:
- 0:c64e1194230b
Vers?o do Protegemed com calculo de tempo de fuga, overflow, underflow e novo valor m?dio (manual).
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rebonatto | 0:c64e1194230b | 1 | #include "TelnetServer.h" |
| rebonatto | 0:c64e1194230b | 2 | #define NUMBERPARAM 3 |
| rebonatto | 0:c64e1194230b | 3 | |
| rebonatto | 0:c64e1194230b | 4 | char *msg_list_param[NUMBERPARAM] = { "bla", |
| rebonatto | 0:c64e1194230b | 5 | "bla2", |
| rebonatto | 0:c64e1194230b | 6 | "Bla23" }; |
| rebonatto | 0:c64e1194230b | 7 | |
| rebonatto | 0:c64e1194230b | 8 | char *header_msg_listparam = "This is a list of available parameters:\r\n\r\n"; |
| rebonatto | 0:c64e1194230b | 9 | |
| rebonatto | 0:c64e1194230b | 10 | |
| rebonatto | 0:c64e1194230b | 11 | int TelnetServer::ListParamCommand(TCPSocketConnection *conn, char ** argv,int argc) |
| rebonatto | 0:c64e1194230b | 12 | { |
| rebonatto | 0:c64e1194230b | 13 | printf("Entering list parameters command...\n"); |
| rebonatto | 0:c64e1194230b | 14 | |
| rebonatto | 0:c64e1194230b | 15 | conn->send(header_msg_listparam,strlen(header_msg_listparam)); |
| rebonatto | 0:c64e1194230b | 16 | |
| rebonatto | 0:c64e1194230b | 17 | int i; |
| rebonatto | 0:c64e1194230b | 18 | for(i=0;i < NUMBERPARAM ;i++) |
| rebonatto | 0:c64e1194230b | 19 | { |
| rebonatto | 0:c64e1194230b | 20 | |
| rebonatto | 0:c64e1194230b | 21 | Thread::wait(20); |
| rebonatto | 0:c64e1194230b | 22 | conn->send(msg_list_param[i],strlen(msg_list_param[i])); |
| rebonatto | 0:c64e1194230b | 23 | |
| rebonatto | 0:c64e1194230b | 24 | //printf("Parameter = %s\n",msg_list_param[i]); |
| rebonatto | 0:c64e1194230b | 25 | conn->send("\r\n",2); |
| rebonatto | 0:c64e1194230b | 26 | } |
| rebonatto | 0:c64e1194230b | 27 | |
| rebonatto | 0:c64e1194230b | 28 | return 0; |
| rebonatto | 0:c64e1194230b | 29 | } |
