cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
http.hpp
Go to the documentation of this file.
1 
17 
30 #ifndef _HTTP_H_
31 #define _HTTP_H_
32 
33 #include <stdint.h>
34 #include "ap_int.h"
35 
36 
37 //#define COSIM
38 //#ifdef COSIM
39 #define REQ_INVALID 0x01
40 #define POST_CONFIG 0x02
41 #define GET_STATUS 0x40 //MUST NOT BE EUQIVALENT to OPRV_SKIPPED!!
42 #define PUT_RANK 0x08
43 #define PUT_SIZE 0x10
44 #define POST_ROUTING 0x20
45 #define CUSTOM_API 0x80
46 #define RequestType uint8_t
47 //#else
48 //typedef enum {REQ_INVALID = 0, POST_CONFIG, GET_STATUS, PUT_RANK, PUT_SIZE, POST_ROUTING} RequestType;
49 //#endif
50 
51 extern RequestType reqType;
52 
53 
54 int writeString(char* s);
55 int8_t writeHttpStatus(int status, uint16_t content_length);
56 int request_len(ap_uint<16> offset, int maxLength);
57 
58 int my_wordlen(char *s);
59 int my_atoi(char *str, int strlen);
60 //void my_itoa(unsigned long num, char *arr, unsigned char base);
61 int writeUnsignedLong(unsigned long num, uint8_t base);
62 
63 
64 void parseHttpInput(bool transferErr, ap_uint<1> wasAbort, bool invalidPayload, bool rx_done);
65 
66 
67 #endif
68 
69 
70 
int my_wordlen(char *s)
Definition: http.cpp:63
uint8_t reqType
Definition: http.cpp:284
int8_t writeHttpStatus(int status, uint16_t content_length)
Definition: http.cpp:190
int my_atoi(char *str, int strlen)
Definition: http.cpp:177
void parseHttpInput(bool transferErr, ap_uint< 1 > wasAbort, bool invalidPayload, bool rx_done)
Definition: http.cpp:401
#define RequestType
Definition: http.hpp:46
int writeString(char *s)
Definition: http.cpp:76
int writeUnsignedLong(unsigned long num, uint8_t base)
Definition: http.cpp:119
int request_len(ap_uint< 16 > offset, int maxLength)
Definition: http.cpp:286