TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers httpserverapp.h Source File

httpserverapp.h

00001 /******************************************************************************
00002 *
00003 *   Copyright (C) 2013 Texas Instruments Incorporated
00004 *
00005 *   All rights reserved. Property of Texas Instruments Incorporated.
00006 *   Restricted rights to use, duplicate or disclose this code are
00007 *   granted through contract.
00008 *
00009 *   The program may not be used without the written permission of
00010 *   Texas Instruments Incorporated or against the terms and conditions
00011 *   stipulated in the agreement under which this program has been supplied,
00012 *   and under no circumstances can it be used with non-TI connectivity device.
00013 *
00014 ******************************************************************************/
00015 /**
00016  * @defgroup Httpserverapp
00017  *
00018  * @{
00019  */
00020 
00021 #ifndef __HTTP_APP_H__
00022 #define __HTTP_APP_H__
00023 
00024 #define DEVICE_NAME                   "httpserver"
00025 #define TI_NAME                       "cc3200_"
00026 #define mDNS_SERV                     "._device-info._tcp.local"
00027 #define TTL_MDNS_SERV                 4500
00028 
00029 #define MAX_DEV_NAME_SIZE                       23
00030 
00031 //*****************************************************************************
00032 //
00033 // If building with a C++ compiler, make all of the definitions in this header
00034 // have a C binding.
00035 //
00036 //*****************************************************************************
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 
00042 typedef struct
00043 {
00044   unsigned char DevNameLen;
00045   unsigned char DevName[MAX_DEV_NAME_SIZE];
00046 }t_DevName;
00047 
00048 typedef struct
00049 {
00050     char    mDNSServNameUnReg[64];
00051     unsigned char   mDNSServNameUnRegLen;
00052 
00053 }t_mDNSService;
00054 
00055 
00056 //extern void HttpServerAppTask(void *);
00057 //extern void Init3200SimpleLink ( void );
00058 //void InitCameraComponents(int width, int height);
00059 
00060 /*!
00061  *  \brief                  This websocket Event is called when WebSocket Server receives data
00062  *                          from client.
00063  *
00064  *
00065  *  \param[in] puConnection Websocket Client Id
00066  *  \param[in] *ReadBuffer      Pointer to the buffer that holds the payload.
00067  *
00068  *  \return                 none.
00069  *                      
00070  */
00071 
00072 void WebSocketRecvEventHandler(uint16_t uConnection, char *ReadBuffer);
00073 
00074 /*!
00075  *  \brief                          Callback function that indicates that handshake was a success
00076  *                                  Once this is called the server can start sending data packets over websocket using
00077  *                                  the sl_WebSocketSend API.
00078  *
00079  *
00080  *  \param[in] uConnection              Websocket Client Id
00081  *
00082  *  \return                         void
00083  */
00084 
00085 void WebSocketHandshakeEventHandler(uint16_t uConnection);
00086 
00087 /*!
00088  *  \brief                          Callback function that indicates that Websocket is closed
00089  *                                  Once this is called the server acts as HTTP Server
00090  *
00091  *
00092  *  \return                         None
00093  */
00094 void WebSocketCloseSessionHandler(void);
00095 void WebSocketCloseSessionHandler(void);
00096 void CameraAppTask(void *param);
00097 void HttpServerAppTask(void * param);
00098 
00099 //*****************************************************************************
00100 //
00101 // Mark the end of the C bindings section for C++ compilers.
00102 //
00103 //*****************************************************************************
00104 #ifdef __cplusplus
00105 }
00106 #endif /* __cplusplus */
00107 #endif   //__HTTP_APP_H__
00108 
00109