Navigation bar
  Start Previous page  25 of 35  Next page End Home  15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  

Embedded Web Server for the CR16
National Semiconductor
Jeff Wright
25
assuming as your domain www.yourserver.com, this object would assume a URI something
typedef const struct html_t {
    TPB_T *const tpb;
// Pointer to task’s Task Parameter Block
    const  UWORD NumBlocks;
// Number of discrete blocks in this page
       
// Pointer to array of page pointers
    const  UBYTE *const (*BlkAddrs)[];
    UWORD  const (*BlkSz)[];  // Pointer to array of page sizes
    UWORD  const PageSize;
// Total page size in bytes
}HTML_T;
Figure 18.  HTML control structure.
const UBYTE *const err504Ptrs[] = {err504_htm,
                                   err504_htm2,
                                   err504_htm3,
                                   err504_htm4};
const UWORD err504Szs[]         = {sizeof (err504_htm) - 1,
                                   sizeof (err504_htm2) - 1,
                                   sizeof (err504_htm3) - 1,
                                   sizeof (err504_htm4) - 1};
HTML_T err504_html  
  = {&HTTP504TPB,
            
4,
            &err504Ptrs,
            &err504Szs,
            sizeof (err504_htm)
          + sizeof (err504_htm2)
          + sizeof (err504_htm3)
          + sizeof (err504_htm4) - 4};
Figure 19.  504 Page’s HTML control structures.
const   UCHAR   err504Name[] = "/err504.htm";
const   UCHAR   *const  PageNamePtrs[]  = {IndexName,
                     
err504Name,
      
                   .,
                   .,
.,
NULL};
Figure 20.  List of embedded objects (pages).
Microcontroller.com White Papers Previous page Top Next page