Axeda Ready Demo for Freescale FRDM-KL46Z as accident alert system
Dependencies: FRDM_MMA8451Q KL46Z-USBHost MAG3110 SocketModem TSI mbed FATFileSystem
Fork of AxedaGo-Freescal_FRDM-KL46Z revert by
axTransport.h
00001 00002 00003 #ifndef _AXTRANSPORT_H_ 00004 #define _AXTRANSPORT_H_ 00005 00006 #include "axTypes.h" 00007 00008 /************************************************************************************/ 00009 /*Struct ax_socket */ 00010 /* */ 00011 /*The following structure is meant as a mechanism to pass information from a network*/ 00012 /*function to the next. It can be overridden with machine specific code, provided */ 00013 /* that all of the functions in this file prefixed with net_ can handle it correctly*/ 00014 /************************************************************************************/ 00015 typedef struct { 00016 //put any structures/file descriptors here so you can access them from any of the net_ calls. 00017 }ax_socket; 00018 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif 00022 00023 00024 long getEpoch(); 00025 void ax_print(int msgType, char *msg); 00026 int randInt(); 00027 int seedRand(); 00028 00029 void sys_delay(int seconds); 00030 00031 int net_socketInit(ax_socket *sock); 00032 int net_socketOpen(ax_socket *sock, char *server, int port, int secure); 00033 int net_socketWrite(ax_socket *sock, char *data, int size); 00034 int net_socketClose(ax_socket *sock); 00035 int net_socketFlush(ax_socket *sock); 00036 int net_socketRead(ax_socket *sock, int timeout, unsigned char *buffer, int bufferSz, int *readSz); 00037 00038 int scm_download_req(ax_package *request); 00039 int scm_file_write(char *filename, char *data, int length, ax_package_instruction *downloadInfo); 00040 int data_item_write(char *name, char *sValue, int dValue, int ax_type); 00041 int data_item_request(char *name); 00042 00043 int initializeCellular(); 00044 #ifdef __cplusplus 00045 } 00046 #endif 00047 00048 00049 #endif 00050
Generated on Wed Jul 13 2022 02:45:01 by 1.7.2