embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cloud.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "main.h"
#include "net.h"
#include "timedate.h"
#include "heap.h"
#include "rfu.h"
#include "cloud.h"
#include "version.h"
Include dependency graph for cloud.c:

Macros

#define CLOUD_TIMEDATE_TLS_VERIFICATION_IGNORE
 

Enumerations

enum  CLOUD_DEMO_Error_t {
  CLOUD_DEMO_WIFI_INITIALIZATION_ERROR = -2, CLOUD_DEMO_MAC_ADDRESS_ERROR = -3, CLOUD_DEMO_WIFI_CONNECTION_ERROR = -4, CLOUD_DEMO_IP_ADDRESS_ERROR = -5,
  CLOUD_DEMO_CONNECTION_ERROR = -6, CLOUD_DEMO_TIMEDATE_ERROR = -7, CLOUD_DEMO_C2C_INITIALIZATION_ERROR = -8
}
 

Functions

int net_if_init (void *if_ctxt)
 
int net_if_deinit (void *if_ctxt)
 
int net_if_reinit (void *if_ctxt)
 
void CLOUD_Error_Handler (int errorCode)
 This function is executed in case of error occurrence. More...
 
bool dialog_ask (char *s)
 Ask yes/no question. More...
 
int platform_init (void)
 
void platform_deinit ()
 

Variables

const firmware_version_t version = { FW_VERSION_NAME, FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_PATCH, FW_VERSION_DATE}
 

Detailed Description

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics International N.V. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:

  1. Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of other contributors to this software may be used to endorse or promote products derived from this software without specific written permission.
  4. This software, including modifications and/or derivative works of this software, must execute solely and exclusively on microcontroller or microprocessor devices manufactured by or for STMicroelectronics.
  5. Redistribution and use of this software other than as permitted under this license is void and will automatically terminate your rights under this license.

THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

#define CLOUD_TIMEDATE_TLS_VERIFICATION_IGNORE

Accept to connect to a server which is not verified by TLS

Enumeration Type Documentation

Enumerator
CLOUD_DEMO_WIFI_INITIALIZATION_ERROR 
CLOUD_DEMO_MAC_ADDRESS_ERROR 
CLOUD_DEMO_WIFI_CONNECTION_ERROR 
CLOUD_DEMO_IP_ADDRESS_ERROR 
CLOUD_DEMO_CONNECTION_ERROR 
CLOUD_DEMO_TIMEDATE_ERROR 
CLOUD_DEMO_C2C_INITIALIZATION_ERROR 

Function Documentation

void CLOUD_Error_Handler ( int  errorCode)

This function is executed in case of error occurrence.

Parameters
None
Return values
None

Here is the caller graph for this function:

bool dialog_ask ( char *  s)

Ask yes/no question.

Parameters
None
Return values
None

Here is the caller graph for this function:

int net_if_deinit ( void *  if_ctxt)

Here is the caller graph for this function:

int net_if_init ( void *  if_ctxt)

Here is the caller graph for this function:

int net_if_reinit ( void *  if_ctxt)
void platform_deinit ( )

Here is the call graph for this function:

int platform_init ( void  )

Here is the call graph for this function:

Variable Documentation

const firmware_version_t version = { FW_VERSION_NAME, FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_PATCH, FW_VERSION_DATE}