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 #ifndef _AXTYPES_H_
AxedaCorp 0:a725e8eab383 2 #define _AXTYPES_H_
AxedaCorp 0:a725e8eab383 3
AxedaCorp 0:a725e8eab383 4 #include "axSettings.h"
AxedaCorp 0:a725e8eab383 5
AxedaCorp 0:a725e8eab383 6
AxedaCorp 0:a725e8eab383 7 typedef struct ax_dataNode {
AxedaCorp 0:a725e8eab383 8 char name[AX_DN_NAME_S];
AxedaCorp 0:a725e8eab383 9 char sValue[AX_DN_SV_S];
AxedaCorp 0:a725e8eab383 10 double dValue;
AxedaCorp 0:a725e8eab383 11 int type;
AxedaCorp 0:a725e8eab383 12 struct ax_dataNode* next;
AxedaCorp 0:a725e8eab383 13 }ax_dataNode;
AxedaCorp 0:a725e8eab383 14
AxedaCorp 0:a725e8eab383 15 typedef struct ax_dataNode axDataNode;
AxedaCorp 0:a725e8eab383 16
AxedaCorp 0:a725e8eab383 17 typedef struct {
AxedaCorp 0:a725e8eab383 18 int acquisitionTime;
AxedaCorp 0:a725e8eab383 19 int priority;
AxedaCorp 0:a725e8eab383 20 int created;
AxedaCorp 0:a725e8eab383 21 ax_dataNode *data_first;
AxedaCorp 0:a725e8eab383 22 ax_dataNode *data_last;
AxedaCorp 0:a725e8eab383 23 int dataNode_ct;
AxedaCorp 0:a725e8eab383 24 }ax_dataSet;
AxedaCorp 0:a725e8eab383 25
AxedaCorp 0:a725e8eab383 26 typedef struct {
AxedaCorp 0:a725e8eab383 27 char alarmName[AX_ALM_NAME_S];
AxedaCorp 0:a725e8eab383 28 char alarmDescription[AX_ALM_DESC_S];
AxedaCorp 0:a725e8eab383 29 int alarmSeverity;
AxedaCorp 0:a725e8eab383 30 char alarmCause[AX_ALM_CAUSE_S];
AxedaCorp 0:a725e8eab383 31 char alarmReason[AX_ALM_REAS_S];
AxedaCorp 0:a725e8eab383 32 int dateAcquired;
AxedaCorp 0:a725e8eab383 33 int priority;
AxedaCorp 0:a725e8eab383 34 }ax_alarm;
AxedaCorp 0:a725e8eab383 35
AxedaCorp 0:a725e8eab383 36 typedef struct {
AxedaCorp 0:a725e8eab383 37 char name[AX_EVT_NAME_S];
AxedaCorp 0:a725e8eab383 38 char description[AX_EVT_DESC_S];
AxedaCorp 0:a725e8eab383 39 int dateAcquired;
AxedaCorp 0:a725e8eab383 40 int priority;
AxedaCorp 0:a725e8eab383 41 }ax_event;
AxedaCorp 0:a725e8eab383 42
AxedaCorp 0:a725e8eab383 43 typedef struct {
AxedaCorp 0:a725e8eab383 44 double latitude;
AxedaCorp 0:a725e8eab383 45 double longitude;
AxedaCorp 0:a725e8eab383 46 double altitude;
AxedaCorp 0:a725e8eab383 47 int dateAcquired;
AxedaCorp 0:a725e8eab383 48 int priority;
AxedaCorp 0:a725e8eab383 49 }ax_location;
AxedaCorp 0:a725e8eab383 50
AxedaCorp 0:a725e8eab383 51 typedef struct {
AxedaCorp 0:a725e8eab383 52 char deviceId[AX_MSID_DID_S]; //Future expansion
AxedaCorp 0:a725e8eab383 53 char model[AX_MSID_MDL_S];
AxedaCorp 0:a725e8eab383 54 char serial[AX_MSID_SER_S];
AxedaCorp 0:a725e8eab383 55 char tenant[AX_MSID_TEN_S];
AxedaCorp 0:a725e8eab383 56 }ax_deviceID;
AxedaCorp 0:a725e8eab383 57
AxedaCorp 0:a725e8eab383 58 //TODO: Possibly deprecate the ax_registration domain object which is just a ping rate and deviceID. Enforce it in the method.
AxedaCorp 0:a725e8eab383 59 typedef struct {
AxedaCorp 0:a725e8eab383 60 ax_deviceID *device;
AxedaCorp 0:a725e8eab383 61 int pingRate;
AxedaCorp 0:a725e8eab383 62 }ax_registration;
AxedaCorp 0:a725e8eab383 63
AxedaCorp 0:a725e8eab383 64 typedef struct {
AxedaCorp 0:a725e8eab383 65 char name[AX_FILE_NAME_S];
AxedaCorp 0:a725e8eab383 66 char hint[AX_FILE_HINT_S];
AxedaCorp 0:a725e8eab383 67 int size;
AxedaCorp 0:a725e8eab383 68 char fileID[AX_FILE_ID_S];
AxedaCorp 0:a725e8eab383 69 unsigned char *data; //array of bytes/ints/whatever
AxedaCorp 0:a725e8eab383 70 //int priority;
AxedaCorp 0:a725e8eab383 71 }ax_file;
AxedaCorp 0:a725e8eab383 72
AxedaCorp 0:a725e8eab383 73 typedef struct {
AxedaCorp 0:a725e8eab383 74 char hostname[AX_PLAT_HOST_S];
AxedaCorp 0:a725e8eab383 75 int ip[4];
AxedaCorp 0:a725e8eab383 76 int online;
AxedaCorp 0:a725e8eab383 77 int port;
AxedaCorp 0:a725e8eab383 78 int secure; //Use SSL/TLS when talking to the platform.
AxedaCorp 0:a725e8eab383 79 int ping_rate;
AxedaCorp 0:a725e8eab383 80 int verify; //a flag to verify the SSL/TLS certificate of the platform. The certificate MUST be stored locally and match otherwise the TLS handshake will fail.
AxedaCorp 0:a725e8eab383 81 }ax_platform;
AxedaCorp 0:a725e8eab383 82
AxedaCorp 0:a725e8eab383 83 typedef struct pkg_inst{
AxedaCorp 0:a725e8eab383 84 int instruction_type; //mapped to the @type
AxedaCorp 0:a725e8eab383 85 char file_id[AX_PKGI_FID_S];
AxedaCorp 0:a725e8eab383 86 char path[AX_PKGI_PATH_S];
AxedaCorp 0:a725e8eab383 87 char filename[AX_PKGI_FNAME_S];
AxedaCorp 0:a725e8eab383 88 struct pkg_inst *next;
AxedaCorp 0:a725e8eab383 89 }ax_package_instruction;
AxedaCorp 0:a725e8eab383 90
AxedaCorp 0:a725e8eab383 91 typedef struct {
AxedaCorp 0:a725e8eab383 92 char packageID[AX_PKG_ID_S];
AxedaCorp 0:a725e8eab383 93 ax_package_instruction *instructions;
AxedaCorp 0:a725e8eab383 94 int time;
AxedaCorp 0:a725e8eab383 95 int priority;
AxedaCorp 0:a725e8eab383 96 }ax_package;
AxedaCorp 0:a725e8eab383 97
AxedaCorp 0:a725e8eab383 98
AxedaCorp 0:a725e8eab383 99 #endif
AxedaCorp 0:a725e8eab383 100