Axeda demo software for u-blox C027 (GSM)

Dependencies:   mbed

Committer:
AxedaCorp
Date:
Mon Aug 11 19:02:42 2014 +0000
Revision:
0:a725e8eab383
1st commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AxedaCorp 0:a725e8eab383 1 /************************************************************************************/
AxedaCorp 0:a725e8eab383 2 /* axPlatform.h */
AxedaCorp 0:a725e8eab383 3 /* 2013 Axeda Corporation */
AxedaCorp 0:a725e8eab383 4 /* */
AxedaCorp 0:a725e8eab383 5 /* Defines methods for interaction with end points on the Axeda Platform. This */
AxedaCorp 0:a725e8eab383 6 /* is a device independent implementation which can be applied to any device that */
AxedaCorp 0:a725e8eab383 7 /* supports ANSI C. */
AxedaCorp 0:a725e8eab383 8 /************************************************************************************/
AxedaCorp 0:a725e8eab383 9
AxedaCorp 0:a725e8eab383 10 #ifndef AXPLATFORM_H
AxedaCorp 0:a725e8eab383 11 #define AXPLATFORM_H
AxedaCorp 0:a725e8eab383 12
AxedaCorp 0:a725e8eab383 13 #include "axTypes.h"
AxedaCorp 0:a725e8eab383 14 #include <stdio.h>
AxedaCorp 0:a725e8eab383 15
AxedaCorp 0:a725e8eab383 16
AxedaCorp 0:a725e8eab383 17 #define END_BASE 0
AxedaCorp 0:a725e8eab383 18 #define END_DATA 1
AxedaCorp 0:a725e8eab383 19 #define END_AGENTS 2
AxedaCorp 0:a725e8eab383 20 #define END_FILES 3
AxedaCorp 0:a725e8eab383 21 #define END_FILED 4
AxedaCorp 0:a725e8eab383 22 #define END_PACKAGES 5
AxedaCorp 0:a725e8eab383 23 #define END_STATUS 6
AxedaCorp 0:a725e8eab383 24 #define END_REG 7
AxedaCorp 0:a725e8eab383 25
AxedaCorp 0:a725e8eab383 26 #define BUFF_ALARMS 0
AxedaCorp 0:a725e8eab383 27 #define BUFF_EVENTS 1
AxedaCorp 0:a725e8eab383 28 #define BUFF_DATA 2
AxedaCorp 0:a725e8eab383 29 #define BUFF_LOCATIONS 3
AxedaCorp 0:a725e8eab383 30
AxedaCorp 0:a725e8eab383 31 #define PKG_QUEUED 0
AxedaCorp 0:a725e8eab383 32 #define PKG_STARTED 1
AxedaCorp 0:a725e8eab383 33 #define PKG_SUCCESS 2
AxedaCorp 0:a725e8eab383 34 #define PKG_FAILURE 3
AxedaCorp 0:a725e8eab383 35
AxedaCorp 0:a725e8eab383 36 #ifdef __cplusplus
AxedaCorp 0:a725e8eab383 37 extern "C" {
AxedaCorp 0:a725e8eab383 38 #endif
AxedaCorp 0:a725e8eab383 39
AxedaCorp 0:a725e8eab383 40
AxedaCorp 0:a725e8eab383 41 int ax_platform_send(ax_platform *cloud, ax_deviceID *device, ax_dataSet *dataItems[], int numDataSets, ax_alarm *alarms[], int numAlarms, ax_event *events[], int numEvents, ax_location *locations[], int numLocations);
AxedaCorp 0:a725e8eab383 42 int ax_platform_sendData(ax_platform *cloud, ax_deviceID *device, ax_dataSet *dataItems[], int numDataSets);
AxedaCorp 0:a725e8eab383 43 int ax_platform_sendAlarms(ax_platform *cloud, ax_deviceID *device, ax_alarm *alarms[], int numAlarms);
AxedaCorp 0:a725e8eab383 44 int ax_platform_sendEvents(ax_platform *cloud, ax_deviceID *device, ax_event *events[], int numEvents);
AxedaCorp 0:a725e8eab383 45 int ax_platform_sendLocations(ax_platform *cloud, ax_deviceID *device, ax_location *locations[], int numLocations);
AxedaCorp 0:a725e8eab383 46
AxedaCorp 0:a725e8eab383 47 int ax_platform_register(ax_platform *cloud, ax_deviceID *device);
AxedaCorp 0:a725e8eab383 48 int ax_platform_ping(ax_platform *cloud, ax_deviceID *device);
AxedaCorp 0:a725e8eab383 49 int ax_platform_upload(ax_platform *cloud, ax_deviceID *device, ax_file *file);
AxedaCorp 0:a725e8eab383 50 int ax_platform_download(ax_platform *cloud, ax_deviceID *device, ax_package_instruction *instr);
AxedaCorp 0:a725e8eab383 51
AxedaCorp 0:a725e8eab383 52 int ax_platform_setPkgStatus(ax_platform *cloud, ax_deviceID *device, char *pkgID, int status, char *errorMsg);
AxedaCorp 0:a725e8eab383 53 int ax_platform_setPkgStatusStarted(ax_platform *cloud, ax_deviceID *device, char *pkgID);
AxedaCorp 0:a725e8eab383 54 int ax_platform_setPkgStatusQueued(ax_platform *cloud, ax_deviceID *device, char *pkgID);
AxedaCorp 0:a725e8eab383 55 int ax_platform_setPkgStatusSuccess(ax_platform *cloud, ax_deviceID *device, char *pkgID);
AxedaCorp 0:a725e8eab383 56 int ax_platform_setPkgStatusFailed(ax_platform *cloud, ax_deviceID *device, char *pkgID, char *errorMsg);
AxedaCorp 0:a725e8eab383 57 /*******************************************************************************************************/
AxedaCorp 0:a725e8eab383 58 /*The following functions are internal only and should never need to be called outside of this library*/
AxedaCorp 0:a725e8eab383 59 /*****************************************************************************************************/
AxedaCorp 0:a725e8eab383 60 char *encodeAgentID(ax_deviceID *device, char *buff);
AxedaCorp 0:a725e8eab383 61 char *getResource(char *endPointBuff, ax_deviceID *device, int resourceType);
AxedaCorp 0:a725e8eab383 62 char *getDataResource(char *endPointBuff, ax_deviceID *device);
AxedaCorp 0:a725e8eab383 63 char *getAgentResource(char *endPointBuff, ax_deviceID *device);
AxedaCorp 0:a725e8eab383 64 char *getFileResource(char *endPointBuff, ax_deviceID *device);
AxedaCorp 0:a725e8eab383 65 char *getRegistrationResource(char *endPointBuff, ax_deviceID *device);
AxedaCorp 0:a725e8eab383 66 char *getFileDownloadResource(char *endPointBuff, ax_deviceID *device, char *fileID);
AxedaCorp 0:a725e8eab383 67 char *getPackageUpdateResource(char *endPointBuff, ax_deviceID *device, char *packageID);
AxedaCorp 0:a725e8eab383 68
AxedaCorp 0:a725e8eab383 69 char *getContentType(char *contentBuff, int type);
AxedaCorp 0:a725e8eab383 70 char *getGeneralType(char *contentBuff);
AxedaCorp 0:a725e8eab383 71
AxedaCorp 0:a725e8eab383 72 #ifdef __cplusplus
AxedaCorp 0:a725e8eab383 73 }
AxedaCorp 0:a725e8eab383 74 #endif
AxedaCorp 0:a725e8eab383 75
AxedaCorp 0:a725e8eab383 76 #endif
AxedaCorp 0:a725e8eab383 77