nova verzija tcp+udp->serial com

Committer:
bosko001
Date:
Fri Jul 10 11:33:05 2020 +0200
Revision:
26:c14d034d7459
Parent:
9:893843262a1f
ispituje se na terenu

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bosko001 2:45b351b4fc2a 1 #ifndef doHTML_H
bosko001 2:45b351b4fc2a 2 #define doHTML_H
bosko001 2:45b351b4fc2a 3
bosko001 5:c9a908749d4c 4 #include "dxml.h"
bosko001 5:c9a908749d4c 5
bosko001 5:c9a908749d4c 6
bosko001 5:c9a908749d4c 7
bosko001 5:c9a908749d4c 8 class C_HTMLparse
bosko001 5:c9a908749d4c 9 {
bosko001 5:c9a908749d4c 10 private:
bosko001 5:c9a908749d4c 11
bosko001 5:c9a908749d4c 12 char* p_HTMLpage;
bosko001 5:c9a908749d4c 13 dxml_t p_rootHTML;
bosko001 5:c9a908749d4c 14 dxml_t html_body, html_form, html_table, tr;
bosko001 5:c9a908749d4c 15 dxml_t front_row[3];
bosko001 5:c9a908749d4c 16 dxml_t UDPs[10];
bosko001 5:c9a908749d4c 17 dxml_t TCPs[10];
bosko001 5:c9a908749d4c 18 dxml_t serial[4];
bosko001 5:c9a908749d4c 19
bosko001 5:c9a908749d4c 20 void load_front_row();
bosko001 5:c9a908749d4c 21 void load_second_row();
bosko001 5:c9a908749d4c 22 void load_udp_and_tcp(dxml_t& td);
bosko001 5:c9a908749d4c 23 void load_serial(dxml_t& td);
bosko001 5:c9a908749d4c 24 dxml_t get_serial_option(dxml_t s, int option_idx);
bosko001 5:c9a908749d4c 25 void intern_init( void );
bosko001 5:c9a908749d4c 26
bosko001 7:7ea932eb31f6 27 int httpSplitInLines( char *lines[], char * httpresp);
bosko001 7:7ea932eb31f6 28 char * httpFirstLine( char **descr, char *line);
bosko001 7:7ea932eb31f6 29
bosko001 7:7ea932eb31f6 30 struct S_httpPostValues
bosko001 7:7ea932eb31f6 31 {
bosko001 7:7ea932eb31f6 32 char *name;
bosko001 7:7ea932eb31f6 33 char *value;
bosko001 7:7ea932eb31f6 34 } s_hpv[100];
bosko001 7:7ea932eb31f6 35
bosko001 7:7ea932eb31f6 36 struct S_httpPostValues *ps_hpv = s_hpv;
bosko001 7:7ea932eb31f6 37
bosko001 7:7ea932eb31f6 38 int extractPostPairs( struct S_httpPostValues ** ps_hpv, char *line);
bosko001 5:c9a908749d4c 39
bosko001 5:c9a908749d4c 40 public:
bosko001 5:c9a908749d4c 41
bosko001 5:c9a908749d4c 42 C_HTMLparse( void );
bosko001 5:c9a908749d4c 43 C_HTMLparse( const char *str );
bosko001 5:c9a908749d4c 44
bosko001 5:c9a908749d4c 45
bosko001 5:c9a908749d4c 46 const char *get_selected_option( const char *name_option );
bosko001 5:c9a908749d4c 47 const char * set_selected_option( const char* name_option, const char* value_option );
bosko001 9:893843262a1f 48
bosko001 9:893843262a1f 49 const char * get_BaudRate( void );
bosko001 9:893843262a1f 50 const char * get_Parity( void );
bosko001 9:893843262a1f 51 const char * get_StopBits( void );
bosko001 9:893843262a1f 52 const char * get_DataBits( void );
bosko001 9:893843262a1f 53
bosko001 9:893843262a1f 54
bosko001 5:c9a908749d4c 55 char *getHTML_free( void );
bosko001 5:c9a908749d4c 56
bosko001 5:c9a908749d4c 57
bosko001 5:c9a908749d4c 58 const char *get_myIP( void );
bosko001 5:c9a908749d4c 59 const char *get_myMASK(void);
bosko001 5:c9a908749d4c 60 const char *get_myGATE( void );
bosko001 5:c9a908749d4c 61
bosko001 5:c9a908749d4c 62 const char *get_myUdpPort( void );
bosko001 5:c9a908749d4c 63 const char *get_myTcpPort( void );
bosko001 5:c9a908749d4c 64
bosko001 5:c9a908749d4c 65 const char *get_UdpIP( int i );
bosko001 5:c9a908749d4c 66 const char *get_UdpPort( int i );
bosko001 5:c9a908749d4c 67
bosko001 5:c9a908749d4c 68 const char *get_TcpIP( int i );
bosko001 5:c9a908749d4c 69 const char *get_TcpPort( int i );
bosko001 5:c9a908749d4c 70
bosko001 5:c9a908749d4c 71
bosko001 5:c9a908749d4c 72 void set_myIP( const char* str );
bosko001 5:c9a908749d4c 73 void set_myMASK( const char* str );
bosko001 5:c9a908749d4c 74 void set_myGATE( const char* str );
bosko001 5:c9a908749d4c 75
bosko001 5:c9a908749d4c 76 void set_myUdpPort( const char* str );
bosko001 5:c9a908749d4c 77 void set_myTcpPort( const char* str );
bosko001 5:c9a908749d4c 78
bosko001 5:c9a908749d4c 79 void set_UdpIP( int i, const char* str );
bosko001 5:c9a908749d4c 80 void set_UdpPort( int i, const char* str );
bosko001 5:c9a908749d4c 81
bosko001 5:c9a908749d4c 82 void set_TcpIP( int i, const char* str );
bosko001 5:c9a908749d4c 83 void set_TcpPort( int i, const char* str );
bosko001 5:c9a908749d4c 84
bosko001 7:7ea932eb31f6 85
bosko001 5:c9a908749d4c 86
bosko001 7:7ea932eb31f6 87 void htmlPOST_fun( void );
bosko001 2:45b351b4fc2a 88
bosko001 2:45b351b4fc2a 89
bosko001 7:7ea932eb31f6 90 char * doHTTP( char * httpcontents);
bosko001 7:7ea932eb31f6 91
bosko001 7:7ea932eb31f6 92 };
bosko001 2:45b351b4fc2a 93 #endif