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 by Axeda Corp

Committer:
AxedaCorp
Date:
Tue Jul 01 21:31:54 2014 +0000
Revision:
0:65004368569c
Made initial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AxedaCorp 0:65004368569c 1 /************************************************************************************/
AxedaCorp 0:65004368569c 2 /* axDomain.c */
AxedaCorp 0:65004368569c 3 /* �2013 Axeda Corporation */
AxedaCorp 0:65004368569c 4 /* */
AxedaCorp 0:65004368569c 5 /* Defines methods for creation and interaction with Axeda domain constructs. This */
AxedaCorp 0:65004368569c 6 /* is a device independent implementation which can be applied to any device that */
AxedaCorp 0:65004368569c 7 /* supports ANSI C. */
AxedaCorp 0:65004368569c 8 /************************************************************************************/
AxedaCorp 0:65004368569c 9 #include "axDomain.h"
AxedaCorp 0:65004368569c 10 #include "string.h"
AxedaCorp 0:65004368569c 11 #include "axSettings.h"
AxedaCorp 0:65004368569c 12 #include <stdlib.h>
AxedaCorp 0:65004368569c 13 #include <stdio.h>
AxedaCorp 0:65004368569c 14
AxedaCorp 0:65004368569c 15
AxedaCorp 0:65004368569c 16
AxedaCorp 0:65004368569c 17 /************************************************************************************/
AxedaCorp 0:65004368569c 18 /* createAlarm() */
AxedaCorp 0:65004368569c 19 /* */
AxedaCorp 0:65004368569c 20 /* Stores the supplied values into the structure pointed to by alm. */
AxedaCorp 0:65004368569c 21 /* */
AxedaCorp 0:65004368569c 22 /* alm(required) : a pointer to an empty alarm structure */
AxedaCorp 0:65004368569c 23 /* name(required) : the name of the alarm */
AxedaCorp 0:65004368569c 24 /* description(required) : a more detailed account of the alarm */
AxedaCorp 0:65004368569c 25 /* severity(required) : a numerical value from 0-1000, with 1000 being the highest */
AxedaCorp 0:65004368569c 26 /* dataItem(optional) : a pointer to a dataItem structure containing the data item */
AxedaCorp 0:65004368569c 27 /* that triggered this alarm. Use NULL for a generic alarm. */
AxedaCorp 0:65004368569c 28 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARG_NULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 29 /************************************************************************************/
AxedaCorp 0:65004368569c 30 int ax_data_createAlarm(ax_alarm *alm, char *alName, char *alDescription, int alSeverity, char *cause, char *reason, int timeOccured, int priority)
AxedaCorp 0:65004368569c 31 {
AxedaCorp 0:65004368569c 32 int retVal=AX_OK;
AxedaCorp 0:65004368569c 33 if((alSeverity <0)||(alSeverity>1000))
AxedaCorp 0:65004368569c 34 {
AxedaCorp 0:65004368569c 35 return AX_OUT_OF_RANGE;
AxedaCorp 0:65004368569c 36 }
AxedaCorp 0:65004368569c 37 if((!alm)||(!alName)||(!alDescription))
AxedaCorp 0:65004368569c 38 {
AxedaCorp 0:65004368569c 39 return AX_ARGNULL;
AxedaCorp 0:65004368569c 40 }
AxedaCorp 0:65004368569c 41 if(strlen(alName)<=0) {
AxedaCorp 0:65004368569c 42 return AX_ARGNULL;
AxedaCorp 0:65004368569c 43 }
AxedaCorp 0:65004368569c 44
AxedaCorp 0:65004368569c 45 snprintf(alm->alarmName, AX_ALM_NAME_S, alName);
AxedaCorp 0:65004368569c 46 if(strlen(alName)>AX_ALM_NAME_S){
AxedaCorp 0:65004368569c 47 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 48 }
AxedaCorp 0:65004368569c 49
AxedaCorp 0:65004368569c 50 snprintf(alm->alarmDescription, AX_ALM_DESC_S, alDescription);
AxedaCorp 0:65004368569c 51 if(strlen(alDescription)> AX_ALM_DESC_S) {
AxedaCorp 0:65004368569c 52 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 53 }
AxedaCorp 0:65004368569c 54
AxedaCorp 0:65004368569c 55 snprintf(alm->alarmCause, AX_ALM_CAUSE_S, cause);
AxedaCorp 0:65004368569c 56 if(strlen(cause)>AX_ALM_CAUSE_S) {
AxedaCorp 0:65004368569c 57 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 58 }
AxedaCorp 0:65004368569c 59
AxedaCorp 0:65004368569c 60 snprintf(alm->alarmReason, AX_ALM_REAS_S, reason);
AxedaCorp 0:65004368569c 61 if(strlen(reason)>AX_ALM_REAS_S){
AxedaCorp 0:65004368569c 62 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 63 }
AxedaCorp 0:65004368569c 64
AxedaCorp 0:65004368569c 65 alm->alarmSeverity=alSeverity;
AxedaCorp 0:65004368569c 66 alm->dateAcquired=timeOccured;
AxedaCorp 0:65004368569c 67 alm->priority=priority;
AxedaCorp 0:65004368569c 68
AxedaCorp 0:65004368569c 69 return retVal;
AxedaCorp 0:65004368569c 70 }
AxedaCorp 0:65004368569c 71
AxedaCorp 0:65004368569c 72 /*************************************************************************************/
AxedaCorp 0:65004368569c 73 /* createDataItem() */
AxedaCorp 0:65004368569c 74 /* */
AxedaCorp 0:65004368569c 75 /* This function will store information about a dataItem into a structure supplied */
AxedaCorp 0:65004368569c 76 /* by the calling method. There are traditionally 3 types of data Items, analog, */
AxedaCorp 0:65004368569c 77 /* string and digital. */
AxedaCorp 0:65004368569c 78 /* */
AxedaCorp 0:65004368569c 79 /* destDI(required) : A pointer to the structure where the data will be stored */
AxedaCorp 0:65004368569c 80 /* diName(required) : A character array containing the name of the data item */
AxedaCorp 0:65004368569c 81 /* diType(required) : A integer value indicating the data Item type. Can be */
AxedaCorp 0:65004368569c 82 /* AX_STRING, AX_DIGITAL, AX_ANALOG */
AxedaCorp 0:65004368569c 83 /* stringValue(optional): If the type is AX_STRING, this value MUST be populated or */
AxedaCorp 0:65004368569c 84 /* an error will be returned. This is the value of the */
AxedaCorp 0:65004368569c 85 /* dataItem. If it is a String use zero for the numericValue */
AxedaCorp 0:65004368569c 86 /* numericValue(optional): If the type is AX_ANALOG or AX_DIGITAL this value MUST be */
AxedaCorp 0:65004368569c 87 /* provided or an error will be returned. For AX_ANALOG di's */
AxedaCorp 0:65004368569c 88 /* this value can be any numeric value within language */
AxedaCorp 0:65004368569c 89 /* constraints. For AX_DIGITAL, this value must be 1 or 0. */
AxedaCorp 0:65004368569c 90 /* 1 will be considered true and 0 will be considered false. */
AxedaCorp 0:65004368569c 91 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 92 /* AX_DI_UNKNOWN_TYPE, AX_UNKNOWN */
AxedaCorp 0:65004368569c 93 /************************************************************************************/
AxedaCorp 0:65004368569c 94 int ax_data_createDataItem(ax_dataSet *destDI, char *diName, int diType, char *stringValue, double numericValue, int timeAcquired, int priority) {
AxedaCorp 0:65004368569c 95 int retVal=AX_UNKNOWN;
AxedaCorp 0:65004368569c 96 if(!destDI) { return AX_ARGNULL; }
AxedaCorp 0:65004368569c 97 if(!diName) {return AX_ARGNULL; }
AxedaCorp 0:65004368569c 98 if((diType>3)&&(diType<1)) {return AX_ARGNULL; }
AxedaCorp 0:65004368569c 99 if(timeAcquired<0) {return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 100 if((priority<-1)||(priority>100)) { return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 101 if(destDI->created!=AX_TRUE) {
AxedaCorp 0:65004368569c 102 retVal=ax_data_createSet(destDI, timeAcquired, priority);
AxedaCorp 0:65004368569c 103 if(retVal!=AX_OK) { return retVal; }
AxedaCorp 0:65004368569c 104 }
AxedaCorp 0:65004368569c 105
AxedaCorp 0:65004368569c 106 retVal=ax_data_addToSet(destDI, diName, diType, stringValue, numericValue);
AxedaCorp 0:65004368569c 107
AxedaCorp 0:65004368569c 108 return retVal;
AxedaCorp 0:65004368569c 109 }
AxedaCorp 0:65004368569c 110 /*************************************************************************************/
AxedaCorp 0:65004368569c 111 /* createAnalogDataItem() */
AxedaCorp 0:65004368569c 112 /* */
AxedaCorp 0:65004368569c 113 /* This function will store information about a dataItem into a structure supplied */
AxedaCorp 0:65004368569c 114 /* by the calling method. This is a special case of the ax_data_createDataItem() call*/
AxedaCorp 0:65004368569c 115 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 116 /* AX_DI_UNKNOWN_TYPE, AX_UNKNOWN */
AxedaCorp 0:65004368569c 117 /*************************************************************************************/
AxedaCorp 0:65004368569c 118 int ax_data_createAnalogDataItem(ax_dataSet *destDI, char *diName, double value, int timeAcquired, int priority) {
AxedaCorp 0:65004368569c 119 return ax_data_createDataItem(destDI, diName, AX_ANALOG, NULL, value, timeAcquired, priority);
AxedaCorp 0:65004368569c 120 }
AxedaCorp 0:65004368569c 121
AxedaCorp 0:65004368569c 122 /*************************************************************************************/
AxedaCorp 0:65004368569c 123 /* createDigitalDataItem() */
AxedaCorp 0:65004368569c 124 /* */
AxedaCorp 0:65004368569c 125 /* This function will store information about a dataItem into a structure supplied */
AxedaCorp 0:65004368569c 126 /* by the calling method. There are traditionally 3 types of data Items, analog, */
AxedaCorp 0:65004368569c 127 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 128 /* AX_DI_UNKNOWN_TYPE, AX_UNKNOWN */
AxedaCorp 0:65004368569c 129 /*************************************************************************************/
AxedaCorp 0:65004368569c 130 int ax_data_createDigitalDataItem(ax_dataSet *destDI, char *diName, double value, int timeAcquired, int priority) {
AxedaCorp 0:65004368569c 131 return ax_data_createDataItem(destDI, diName, AX_DIGITAL, NULL, value, timeAcquired, priority);
AxedaCorp 0:65004368569c 132 }
AxedaCorp 0:65004368569c 133
AxedaCorp 0:65004368569c 134 /*************************************************************************************/
AxedaCorp 0:65004368569c 135 /* createDataItem() */
AxedaCorp 0:65004368569c 136 /* */
AxedaCorp 0:65004368569c 137 /* This function will store information about a dataItem into a structure supplied */
AxedaCorp 0:65004368569c 138 /* by the calling method. There are traditionally 3 types of data Items, analog, */
AxedaCorp 0:65004368569c 139 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 140 /* AX_DI_UNKNOWN_TYPE, AX_UNKNOWN */
AxedaCorp 0:65004368569c 141 /*************************************************************************************/
AxedaCorp 0:65004368569c 142 int ax_data_createStringDataItem(ax_dataSet *destDI, char *diName, char *value, int timeAcquired, int priority) {
AxedaCorp 0:65004368569c 143 return ax_data_createDataItem(destDI, diName, AX_STRING, value, -1, timeAcquired, priority);
AxedaCorp 0:65004368569c 144 }
AxedaCorp 0:65004368569c 145
AxedaCorp 0:65004368569c 146 /************************************************************************************/
AxedaCorp 0:65004368569c 147 /*ax_data_createSet() */
AxedaCorp 0:65004368569c 148 /* */
AxedaCorp 0:65004368569c 149 /*Creates and populates a dataSet struct pointed to by the *set parameter. A dataSet*/
AxedaCorp 0:65004368569c 150 /*can have multiple data items added by the ax_data_addToSet() method. */
AxedaCorp 0:65004368569c 151 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 152 /************************************************************************************/
AxedaCorp 0:65004368569c 153 int ax_data_createSet(ax_dataSet *set, int acquisitionTime, int priority) {
AxedaCorp 0:65004368569c 154
AxedaCorp 0:65004368569c 155 if(!set) { return AX_ARGNULL; }
AxedaCorp 0:65004368569c 156 if((priority<-1)||(priority>100)) { return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 157 if(acquisitionTime<0) {return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 158 set->dataNode_ct=0;
AxedaCorp 0:65004368569c 159 set->data_first=NULL;
AxedaCorp 0:65004368569c 160 set->data_last=NULL;
AxedaCorp 0:65004368569c 161
AxedaCorp 0:65004368569c 162 if(acquisitionTime >=0) {
AxedaCorp 0:65004368569c 163 set->acquisitionTime=acquisitionTime;
AxedaCorp 0:65004368569c 164 }
AxedaCorp 0:65004368569c 165 else {
AxedaCorp 0:65004368569c 166 set->acquisitionTime=-1;
AxedaCorp 0:65004368569c 167 }
AxedaCorp 0:65004368569c 168 if((priority >=1)&&(priority<=100)) {
AxedaCorp 0:65004368569c 169 set->priority=priority;
AxedaCorp 0:65004368569c 170 }
AxedaCorp 0:65004368569c 171 else {
AxedaCorp 0:65004368569c 172 set->priority=AX_NO_PRIORITY;
AxedaCorp 0:65004368569c 173 }
AxedaCorp 0:65004368569c 174
AxedaCorp 0:65004368569c 175 set->created=AX_TRUE;
AxedaCorp 0:65004368569c 176 return AX_OK;
AxedaCorp 0:65004368569c 177 }
AxedaCorp 0:65004368569c 178 /************************************************************************************/
AxedaCorp 0:65004368569c 179 /*ax_data_addToSet() */
AxedaCorp 0:65004368569c 180 /* */
AxedaCorp 0:65004368569c 181 /*Adds data to a preExisting data set. Data is represented as a linked list and */
AxedaCorp 0:65004368569c 182 /*pointed to by a dataSet structure. Adding data to with this method will cause the */
AxedaCorp 0:65004368569c 183 /*memory to be malloc'd for each data item you set. To remove all data correctly use*/
AxedaCorp 0:65004368569c 184 /*the ax_data_destroySet() function call. You will get memory leaks if you do not. */
AxedaCorp 0:65004368569c 185 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 186 /* AX_DI_UNKNOWN_TYPE */
AxedaCorp 0:65004368569c 187 /************************************************************************************/
AxedaCorp 0:65004368569c 188 int ax_data_addToSet(ax_dataSet *set, char *diName, int diType, char *stringValue, double numericValue){
AxedaCorp 0:65004368569c 189 ax_dataNode *newNode, *temp=NULL;
AxedaCorp 0:65004368569c 190 int retVal=AX_UNKNOWN;
AxedaCorp 0:65004368569c 191
AxedaCorp 0:65004368569c 192 if((diType<1)||(diType>3)){
AxedaCorp 0:65004368569c 193 return AX_DI_UNKNOWN_TYPE;
AxedaCorp 0:65004368569c 194 }
AxedaCorp 0:65004368569c 195
AxedaCorp 0:65004368569c 196 if((!set)||(!diName)){
AxedaCorp 0:65004368569c 197 return AX_ARGNULL;
AxedaCorp 0:65004368569c 198 }
AxedaCorp 0:65004368569c 199
AxedaCorp 0:65004368569c 200 if((diType==AX_STRING)&&(!stringValue)){
AxedaCorp 0:65004368569c 201 return AX_ARGNULL;
AxedaCorp 0:65004368569c 202 }
AxedaCorp 0:65004368569c 203 if((diType==AX_DIGITAL)&&((numericValue<0)||(numericValue>1))){
AxedaCorp 0:65004368569c 204 return AX_OUT_OF_RANGE;
AxedaCorp 0:65004368569c 205 }
AxedaCorp 0:65004368569c 206 //if you didn't create the data set with the function this will make sure the linked list values are set. It MAY overwrite the time and priority if they are already set.
AxedaCorp 0:65004368569c 207 if(set->created!=AX_TRUE) { ax_data_createSet(set, 0, AX_NO_PRIORITY); }
AxedaCorp 0:65004368569c 208
AxedaCorp 0:65004368569c 209 newNode=(ax_dataNode*)malloc(sizeof(ax_dataNode));
AxedaCorp 0:65004368569c 210
AxedaCorp 0:65004368569c 211 retVal=AX_OK;
AxedaCorp 0:65004368569c 212 snprintf(newNode->name, AX_DN_NAME_S, diName);
AxedaCorp 0:65004368569c 213 if(strlen(diName)>AX_DN_NAME_S) {
AxedaCorp 0:65004368569c 214 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 215 }
AxedaCorp 0:65004368569c 216
AxedaCorp 0:65004368569c 217 newNode->next=NULL;
AxedaCorp 0:65004368569c 218 newNode->type=diType;
AxedaCorp 0:65004368569c 219 if(diType==AX_STRING) {
AxedaCorp 0:65004368569c 220 snprintf(newNode->sValue, AX_DN_SV_S, stringValue);
AxedaCorp 0:65004368569c 221 if(strlen(stringValue)>AX_DN_SV_S) {
AxedaCorp 0:65004368569c 222 retVal=AX_GEN_STR_TRUNC; // if the requested value was too large, set a warning to let us know it was truncated
AxedaCorp 0:65004368569c 223 }
AxedaCorp 0:65004368569c 224 }
AxedaCorp 0:65004368569c 225 else {
AxedaCorp 0:65004368569c 226 newNode->dValue=numericValue;
AxedaCorp 0:65004368569c 227 }
AxedaCorp 0:65004368569c 228
AxedaCorp 0:65004368569c 229 if(set->data_first==NULL) {
AxedaCorp 0:65004368569c 230 set->data_first=newNode;
AxedaCorp 0:65004368569c 231 }
AxedaCorp 0:65004368569c 232
AxedaCorp 0:65004368569c 233 if(set->data_last!=NULL) {
AxedaCorp 0:65004368569c 234 temp=set->data_last;
AxedaCorp 0:65004368569c 235 temp->next=(ax_dataNode *)newNode;
AxedaCorp 0:65004368569c 236 }
AxedaCorp 0:65004368569c 237
AxedaCorp 0:65004368569c 238
AxedaCorp 0:65004368569c 239 set->data_last=newNode;
AxedaCorp 0:65004368569c 240 int nodect=set->dataNode_ct;
AxedaCorp 0:65004368569c 241 nodect++;
AxedaCorp 0:65004368569c 242 set->dataNode_ct=nodect;
AxedaCorp 0:65004368569c 243
AxedaCorp 0:65004368569c 244 return retVal;
AxedaCorp 0:65004368569c 245 }
AxedaCorp 0:65004368569c 246 /************************************************************************************/
AxedaCorp 0:65004368569c 247 /*ax_data_addStringToSet() */
AxedaCorp 0:65004368569c 248 /* */
AxedaCorp 0:65004368569c 249 /*Adds data to a preExisting data set. Data is represented as a linked list and */
AxedaCorp 0:65004368569c 250 /*pointed to by a dataSet structure. Adding data to with this method will cause the */
AxedaCorp 0:65004368569c 251 /*memory to be malloc'd for each data item you set. To remove all data correctly use*/
AxedaCorp 0:65004368569c 252 /*the ax_data_destroySet() function call. You will get memory leaks if you do not. */
AxedaCorp 0:65004368569c 253 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 254 /************************************************************************************/
AxedaCorp 0:65004368569c 255 int ax_data_addStringToSet(ax_dataSet *set, char *diName, char *value) {
AxedaCorp 0:65004368569c 256 return ax_data_addToSet(set, diName, AX_STRING, value, -1);
AxedaCorp 0:65004368569c 257 }
AxedaCorp 0:65004368569c 258 /************************************************************************************/
AxedaCorp 0:65004368569c 259 /*ax_data_addAnalogToSet() */
AxedaCorp 0:65004368569c 260 /* */
AxedaCorp 0:65004368569c 261 /*Adds data to a preExisting data set. Data is represented as a linked list and */
AxedaCorp 0:65004368569c 262 /*pointed to by a dataSet structure. Adding data to with this method will cause the */
AxedaCorp 0:65004368569c 263 /*memory to be malloc'd for each data item you set. To remove all data correctly use*/
AxedaCorp 0:65004368569c 264 /*the ax_data_destroySet() function call. You will get memory leaks if you do not. */
AxedaCorp 0:65004368569c 265 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_OK */
AxedaCorp 0:65004368569c 266 /************************************************************************************/
AxedaCorp 0:65004368569c 267 int ax_data_addAnalogToSet(ax_dataSet *set, char *diName, double value){
AxedaCorp 0:65004368569c 268 return ax_data_addToSet(set, diName, AX_ANALOG, NULL, value);
AxedaCorp 0:65004368569c 269 }
AxedaCorp 0:65004368569c 270 /************************************************************************************/
AxedaCorp 0:65004368569c 271 /*ax_data_addDigitalToSet() */
AxedaCorp 0:65004368569c 272 /* */
AxedaCorp 0:65004368569c 273 /*Adds data to a preExisting data set. Data is represented as a linked list and */
AxedaCorp 0:65004368569c 274 /*pointed to by a dataSet structure. Adding data to with this method will cause the */
AxedaCorp 0:65004368569c 275 /*memory to be malloc'd for each data item you set. To remove all data correctly use*/
AxedaCorp 0:65004368569c 276 /*the ax_data_destroySet() function call. You will get memory leaks if you do not. */
AxedaCorp 0:65004368569c 277 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_OK */
AxedaCorp 0:65004368569c 278 /************************************************************************************/
AxedaCorp 0:65004368569c 279 int ax_data_addDigitalToSet(ax_dataSet *set, char *diName, double value) {
AxedaCorp 0:65004368569c 280 return ax_data_addToSet(set, diName, AX_DIGITAL, NULL, value);
AxedaCorp 0:65004368569c 281 }
AxedaCorp 0:65004368569c 282
AxedaCorp 0:65004368569c 283
AxedaCorp 0:65004368569c 284 /************************************************************************************/
AxedaCorp 0:65004368569c 285 /*ax_data_destroySet() */
AxedaCorp 0:65004368569c 286 /* */
AxedaCorp 0:65004368569c 287 /*Iterates through all data items in a dataset and frees them. This assumes all nodes*/
AxedaCorp 0:65004368569c 288 /*have been allocated by malloc.If the addToSet() function was being used then that */
AxedaCorp 0:65004368569c 289 /*will be true. */
AxedaCorp 0:65004368569c 290 /*Possible Return Codes: AX_OK AX_ARGNULL */
AxedaCorp 0:65004368569c 291 /************************************************************************************/
AxedaCorp 0:65004368569c 292 int ax_data_destroySet(ax_dataSet *set) {
AxedaCorp 0:65004368569c 293
AxedaCorp 0:65004368569c 294 if(set!=NULL) {
AxedaCorp 0:65004368569c 295 ax_dataNode *curr=set->data_first, *next;
AxedaCorp 0:65004368569c 296 int ctr;
AxedaCorp 0:65004368569c 297 for(ctr=0; ctr<set->dataNode_ct; ctr++)
AxedaCorp 0:65004368569c 298 {
AxedaCorp 0:65004368569c 299 next=(ax_dataNode *)curr->next;
AxedaCorp 0:65004368569c 300 free(curr);
AxedaCorp 0:65004368569c 301 curr=next;
AxedaCorp 0:65004368569c 302 next=NULL; // CYA'ing here
AxedaCorp 0:65004368569c 303 }
AxedaCorp 0:65004368569c 304 set->data_first=NULL;
AxedaCorp 0:65004368569c 305 set->data_last=NULL;
AxedaCorp 0:65004368569c 306 }
AxedaCorp 0:65004368569c 307 else {
AxedaCorp 0:65004368569c 308 return AX_ARGNULL;
AxedaCorp 0:65004368569c 309 }
AxedaCorp 0:65004368569c 310
AxedaCorp 0:65004368569c 311 return AX_OK;
AxedaCorp 0:65004368569c 312 }
AxedaCorp 0:65004368569c 313
AxedaCorp 0:65004368569c 314
AxedaCorp 0:65004368569c 315 /*************************************************************************************/
AxedaCorp 0:65004368569c 316 /* createEvent() */
AxedaCorp 0:65004368569c 317 /* */
AxedaCorp 0:65004368569c 318 /* This function will populate an event structure and check the values to ensure they*/
AxedaCorp 0:65004368569c 319 /* are within protocol limit */
AxedaCorp 0:65004368569c 320 /* Possible Return Codes: AX_ARGNULL, AX_GEN_STR_TRUNC */
AxedaCorp 0:65004368569c 321 /************************************************************************************/
AxedaCorp 0:65004368569c 322 int ax_data_createEvent(ax_event *evt, char *name, char *description, int timeOccured, int priority)
AxedaCorp 0:65004368569c 323 {
AxedaCorp 0:65004368569c 324 int retVal=AX_OK;
AxedaCorp 0:65004368569c 325 if((!evt)||(!name)||(!description)){
AxedaCorp 0:65004368569c 326 return AX_ARGNULL;
AxedaCorp 0:65004368569c 327 }
AxedaCorp 0:65004368569c 328 if((priority<-1)||(priority>100)) {return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 329
AxedaCorp 0:65004368569c 330 snprintf(evt->name,AX_EVT_NAME_S, name);
AxedaCorp 0:65004368569c 331 if(strlen(name)>AX_EVT_NAME_S) {
AxedaCorp 0:65004368569c 332 retVal= AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 333 }
AxedaCorp 0:65004368569c 334
AxedaCorp 0:65004368569c 335 snprintf(evt->description, AX_EVT_DESC_S, description);
AxedaCorp 0:65004368569c 336 if(strlen(description)>AX_EVT_DESC_S) {
AxedaCorp 0:65004368569c 337 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 338 }
AxedaCorp 0:65004368569c 339
AxedaCorp 0:65004368569c 340 evt->dateAcquired=timeOccured;
AxedaCorp 0:65004368569c 341 evt->priority=priority;
AxedaCorp 0:65004368569c 342 return retVal;
AxedaCorp 0:65004368569c 343 }
AxedaCorp 0:65004368569c 344
AxedaCorp 0:65004368569c 345
AxedaCorp 0:65004368569c 346
AxedaCorp 0:65004368569c 347
AxedaCorp 0:65004368569c 348 /************************************************************************************/
AxedaCorp 0:65004368569c 349 /* createLocation() */
AxedaCorp 0:65004368569c 350 /* */
AxedaCorp 0:65004368569c 351 /* This function will populate a location structure storing the current location */
AxedaCorp 0:65004368569c 352 /* */
AxedaCorp 0:65004368569c 353 /* loc (required) : A structure that will be populated with the data */
AxedaCorp 0:65004368569c 354 /* lat (required) : A number between 90 and -90 representing the degrees latitude. */
AxedaCorp 0:65004368569c 355 /* lon (required) : A number between 180 and -180 representing the degrees longitude*/
AxedaCorp 0:65004368569c 356 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARGNULL, AX_OK */
AxedaCorp 0:65004368569c 357 /************************************************************************************/
AxedaCorp 0:65004368569c 358 int ax_data_createLocation(ax_location *loc, double lat, double lon, double alt, int timeAcquired, int priority){
AxedaCorp 0:65004368569c 359 if(!loc){
AxedaCorp 0:65004368569c 360 return AX_ARGNULL;
AxedaCorp 0:65004368569c 361 }
AxedaCorp 0:65004368569c 362
AxedaCorp 0:65004368569c 363 if((lat>90)||(lat<-90)){
AxedaCorp 0:65004368569c 364 return AX_OUT_OF_RANGE;
AxedaCorp 0:65004368569c 365 }
AxedaCorp 0:65004368569c 366
AxedaCorp 0:65004368569c 367 if((lon>180)||(lon<-180)){
AxedaCorp 0:65004368569c 368 return AX_OUT_OF_RANGE;
AxedaCorp 0:65004368569c 369 }
AxedaCorp 0:65004368569c 370
AxedaCorp 0:65004368569c 371
AxedaCorp 0:65004368569c 372 loc->latitude=lat;
AxedaCorp 0:65004368569c 373 loc->longitude=lon;
AxedaCorp 0:65004368569c 374 loc->altitude=alt;
AxedaCorp 0:65004368569c 375
AxedaCorp 0:65004368569c 376 loc->dateAcquired=timeAcquired;
AxedaCorp 0:65004368569c 377 loc->priority=priority;
AxedaCorp 0:65004368569c 378 return AX_OK;
AxedaCorp 0:65004368569c 379 }
AxedaCorp 0:65004368569c 380
AxedaCorp 0:65004368569c 381 /************************************************************************************/
AxedaCorp 0:65004368569c 382 /* createModelSerialDeviceId() */
AxedaCorp 0:65004368569c 383 /* */
AxedaCorp 0:65004368569c 384 /* This function will populate a structure that stores data about the device's iden-*/
AxedaCorp 0:65004368569c 385 /* tification. The Axeda platform allows for multiple ways of identifying a device. */
AxedaCorp 0:65004368569c 386 /* */
AxedaCorp 0:65004368569c 387 /* device(required) : a pointer to a structure where the data will be stored */
AxedaCorp 0:65004368569c 388 /* model (required) : A model number that describes a particular family of device. */
AxedaCorp 0:65004368569c 389 /* If this were describing a car it could be a Ford_Mustang */
AxedaCorp 0:65004368569c 390 /* serial (required) : A unique Identifier for the device. If it was a car it would */
AxedaCorp 0:65004368569c 391 /* be analagous to the VIN number. */
AxedaCorp 0:65004368569c 392 /* tenant (optional) : The identifier of the Axeda tenant instance. Not currently */
AxedaCorp 0:65004368569c 393 /* used and should always default to zero. */
AxedaCorp 0:65004368569c 394 /* Possible Return Codes: AX_ARGNULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 395 /************************************************************************************/
AxedaCorp 0:65004368569c 396
AxedaCorp 0:65004368569c 397 int ax_data_createModelSerialDeviceId(ax_deviceID *device, char *model, char *serial, char *tenant) {
AxedaCorp 0:65004368569c 398 int retVal=AX_OK;
AxedaCorp 0:65004368569c 399 if((!device)||(!model)||(!serial)){
AxedaCorp 0:65004368569c 400 return AX_ARGNULL;
AxedaCorp 0:65004368569c 401 }
AxedaCorp 0:65004368569c 402 snprintf(device->model, AX_MSID_MDL_S, model);
AxedaCorp 0:65004368569c 403 if(strlen(model)> AX_MSID_MDL_S) {
AxedaCorp 0:65004368569c 404 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 405 }
AxedaCorp 0:65004368569c 406
AxedaCorp 0:65004368569c 407 snprintf(device->serial, AX_MSID_SER_S, serial);
AxedaCorp 0:65004368569c 408 if(strlen(serial)>AX_MSID_SER_S) {
AxedaCorp 0:65004368569c 409 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 410 }
AxedaCorp 0:65004368569c 411
AxedaCorp 0:65004368569c 412 memset(device->tenant, '\0', AX_MSID_TEN_S);
AxedaCorp 0:65004368569c 413 if(tenant!=NULL) {
AxedaCorp 0:65004368569c 414 snprintf(device->tenant, AX_MSID_TEN_S, "%s", tenant);
AxedaCorp 0:65004368569c 415 if(strlen(tenant)>AX_MSID_TEN_S) { retVal=AX_GEN_STR_TRUNC; }
AxedaCorp 0:65004368569c 416 }
AxedaCorp 0:65004368569c 417
AxedaCorp 0:65004368569c 418 return retVal;
AxedaCorp 0:65004368569c 419 }
AxedaCorp 0:65004368569c 420 /************************************************************************************/
AxedaCorp 0:65004368569c 421 /*ax_createPlatform() */
AxedaCorp 0:65004368569c 422 /* */
AxedaCorp 0:65004368569c 423 /*Populates the ax_platform struct pointed to by axedaCloud It will add the hostname*/
AxedaCorp 0:65004368569c 424 /*ip and port. Other parts of the ax_platform structure can be populated at will */
AxedaCorp 0:65004368569c 425 /* */
AxedaCorp 0:65004368569c 426 /* */
AxedaCorp 0:65004368569c 427 /* Possible Return Codes: AX_OUT_OF_RANGE, AX_ARG_NULL, AX_GEN_STR_TRUNC, AX_OK */
AxedaCorp 0:65004368569c 428 /************************************************************************************/
AxedaCorp 0:65004368569c 429 int ax_createPlatform(ax_platform *axedaCloud, char *hostname, int ip[], int port)
AxedaCorp 0:65004368569c 430 {
AxedaCorp 0:65004368569c 431 int retVal=AX_OK;
AxedaCorp 0:65004368569c 432 //Check that there's an IP or Hostname.
AxedaCorp 0:65004368569c 433 if((!ip)&&(!hostname))
AxedaCorp 0:65004368569c 434 { return AX_ARGNULL; }
AxedaCorp 0:65004368569c 435 if(!axedaCloud) {return AX_ARGNULL; }
AxedaCorp 0:65004368569c 436 //Check the port is in bounds of known ports
AxedaCorp 0:65004368569c 437 if((port<0)||(port>65536)) {
AxedaCorp 0:65004368569c 438 return AX_OUT_OF_RANGE;
AxedaCorp 0:65004368569c 439 }
AxedaCorp 0:65004368569c 440 if((hostname)&&(strlen(hostname)>0))
AxedaCorp 0:65004368569c 441 {
AxedaCorp 0:65004368569c 442 snprintf(axedaCloud->hostname, AX_PLAT_HOST_S, hostname);
AxedaCorp 0:65004368569c 443 if(strlen(hostname)>AX_PLAT_HOST_S) {
AxedaCorp 0:65004368569c 444 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 445 }
AxedaCorp 0:65004368569c 446 }
AxedaCorp 0:65004368569c 447 else {
AxedaCorp 0:65004368569c 448 return AX_ARG_EMPTY;
AxedaCorp 0:65004368569c 449 }
AxedaCorp 0:65004368569c 450
AxedaCorp 0:65004368569c 451 if(ip)
AxedaCorp 0:65004368569c 452 {
AxedaCorp 0:65004368569c 453 int i=0;
AxedaCorp 0:65004368569c 454 for(i=0; i<4; i++) { if((ip[i]>255)||(ip[i]<0)) return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 455 axedaCloud->ip[0]=ip[0];
AxedaCorp 0:65004368569c 456 axedaCloud->ip[1]=ip[1];
AxedaCorp 0:65004368569c 457 axedaCloud->ip[2]=ip[2];
AxedaCorp 0:65004368569c 458 axedaCloud->ip[3]=ip[3];
AxedaCorp 0:65004368569c 459
AxedaCorp 0:65004368569c 460 }
AxedaCorp 0:65004368569c 461 axedaCloud->port=port;
AxedaCorp 0:65004368569c 462 return retVal;
AxedaCorp 0:65004368569c 463 }
AxedaCorp 0:65004368569c 464 /************************************************************************************/
AxedaCorp 0:65004368569c 465 /* ax_createFile() */
AxedaCorp 0:65004368569c 466 /* */
AxedaCorp 0:65004368569c 467 /* Populates a file structure with the necessary info and checks the arguments to */
AxedaCorp 0:65004368569c 468 /* ensure compliance with the protocol */
AxedaCorp 0:65004368569c 469 /* Possible Return Codes: AX_UNKNOWN, AX_GEN_STR_TRUNC, AX_OK, AX_ARGNULL */
AxedaCorp 0:65004368569c 470 /* */
AxedaCorp 0:65004368569c 471 /*file (required): A pointer to an already existing ax_file structure to store data */
AxedaCorp 0:65004368569c 472 /*name (required): A name for the file, this can be any arbitrary string. It will */
AxedaCorp 0:65004368569c 473 /* appear on the platform after upload */
AxedaCorp 0:65004368569c 474 /*hint (optional): A string that allows for easy retrieval on the platform */
AxedaCorp 0:65004368569c 475 /*size (required): The size of the file to send. The end of the file would occur at */
AxedaCorp 0:65004368569c 476 /* data+size */
AxedaCorp 0:65004368569c 477 /*data (required): A pointer to the starting address of data to send, it can be the */
AxedaCorp 0:65004368569c 478 /* first cell in an array or any location in memory. */
AxedaCorp 0:65004368569c 479 /************************************************************************************/
AxedaCorp 0:65004368569c 480 int ax_createFile(ax_file *file, char *name, char *hint, int size, unsigned char *data)
AxedaCorp 0:65004368569c 481 {
AxedaCorp 0:65004368569c 482 int retVal=AX_OK;
AxedaCorp 0:65004368569c 483 //ARG Checks
AxedaCorp 0:65004368569c 484 if(size<=0) { return AX_OUT_OF_RANGE; }
AxedaCorp 0:65004368569c 485 if(file==NULL) { return AX_ARGNULL; }
AxedaCorp 0:65004368569c 486 if(name==NULL) { return AX_ARGNULL; }
AxedaCorp 0:65004368569c 487 if(data==NULL) { return AX_ARGNULL; }
AxedaCorp 0:65004368569c 488 //Store the data into the structure
AxedaCorp 0:65004368569c 489 snprintf(file->name, AX_FILE_NAME_S, name);
AxedaCorp 0:65004368569c 490 if(strlen(name)>AX_FILE_NAME_S){
AxedaCorp 0:65004368569c 491 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 492 }
AxedaCorp 0:65004368569c 493
AxedaCorp 0:65004368569c 494 if(hint!=NULL) {
AxedaCorp 0:65004368569c 495 snprintf(file->hint, AX_FILE_HINT_S, hint);
AxedaCorp 0:65004368569c 496 if(strlen(hint)>AX_FILE_HINT_S) {
AxedaCorp 0:65004368569c 497 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 498 }
AxedaCorp 0:65004368569c 499 }
AxedaCorp 0:65004368569c 500
AxedaCorp 0:65004368569c 501 file->size=size;
AxedaCorp 0:65004368569c 502 file->data=data;
AxedaCorp 0:65004368569c 503
AxedaCorp 0:65004368569c 504 return retVal;
AxedaCorp 0:65004368569c 505 }
AxedaCorp 0:65004368569c 506
AxedaCorp 0:65004368569c 507 /************************************************************************************/
AxedaCorp 0:65004368569c 508 /*ax_createPackageInstruction() */
AxedaCorp 0:65004368569c 509 /* */
AxedaCorp 0:65004368569c 510 /*populates an ax_package_instruction structre passed in. This should never need to */
AxedaCorp 0:65004368569c 511 /*be called by a library implementor. It will only be used for egress notifications */
AxedaCorp 0:65004368569c 512 /* */
AxedaCorp 0:65004368569c 513 /* */
AxedaCorp 0:65004368569c 514 /************************************************************************************/
AxedaCorp 0:65004368569c 515 int ax_pkg_createPackageInstruction(ax_package_instruction *inst, int instruction_type, char *file_id, char *path, char *filename){
AxedaCorp 0:65004368569c 516 int retVal=AX_OK;
AxedaCorp 0:65004368569c 517
AxedaCorp 0:65004368569c 518 inst->instruction_type=instruction_type;
AxedaCorp 0:65004368569c 519 int fdSZ=snprintf(inst->file_id, AX_PKGI_FID_S, file_id);
AxedaCorp 0:65004368569c 520 if(strlen(file_id)>fdSZ) {
AxedaCorp 0:65004368569c 521 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 522 }
AxedaCorp 0:65004368569c 523
AxedaCorp 0:65004368569c 524 int pathSZ=snprintf(inst->path, AX_PKGI_PATH_S, path);
AxedaCorp 0:65004368569c 525 if(strlen(path)>pathSZ) {
AxedaCorp 0:65004368569c 526 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 527 }
AxedaCorp 0:65004368569c 528
AxedaCorp 0:65004368569c 529
AxedaCorp 0:65004368569c 530 int fnSZ=snprintf(inst->filename, AX_PKGI_FNAME_S, filename);
AxedaCorp 0:65004368569c 531 if(strlen(filename)>fnSZ) {
AxedaCorp 0:65004368569c 532 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 533 }
AxedaCorp 0:65004368569c 534 inst->next=NULL;
AxedaCorp 0:65004368569c 535
AxedaCorp 0:65004368569c 536 return retVal;
AxedaCorp 0:65004368569c 537 }
AxedaCorp 0:65004368569c 538
AxedaCorp 0:65004368569c 539 /************************************************************************************/
AxedaCorp 0:65004368569c 540 /*ax_createPackage() */
AxedaCorp 0:65004368569c 541 /* */
AxedaCorp 0:65004368569c 542 /*populates an ax_package structre passed in. This should never need to be called by*/
AxedaCorp 0:65004368569c 543 /*a library implementor. It will only be used for egress notifications */
AxedaCorp 0:65004368569c 544 /* */
AxedaCorp 0:65004368569c 545 /* */
AxedaCorp 0:65004368569c 546 /************************************************************************************/
AxedaCorp 0:65004368569c 547 int ax_pkg_createPackage(ax_package *package, char *pkgID, int time, int priority) {
AxedaCorp 0:65004368569c 548 int retVal=AX_OK;
AxedaCorp 0:65004368569c 549
AxedaCorp 0:65004368569c 550 int nmsz=snprintf(package->packageID, AX_PKG_ID_S, pkgID);
AxedaCorp 0:65004368569c 551 if(strlen(pkgID)> nmsz) {
AxedaCorp 0:65004368569c 552 retVal=AX_GEN_STR_TRUNC;
AxedaCorp 0:65004368569c 553 }
AxedaCorp 0:65004368569c 554 package->time=time;
AxedaCorp 0:65004368569c 555 package->priority=priority;
AxedaCorp 0:65004368569c 556 package->instructions=NULL;
AxedaCorp 0:65004368569c 557
AxedaCorp 0:65004368569c 558
AxedaCorp 0:65004368569c 559 return retVal;
AxedaCorp 0:65004368569c 560 }
AxedaCorp 0:65004368569c 561 /************************************************************************************/
AxedaCorp 0:65004368569c 562 /*ax_pkg_addDLInstruction() */
AxedaCorp 0:65004368569c 563 /* */
AxedaCorp 0:65004368569c 564 /*Adds a file download package to an already existing package. This function will */
AxedaCorp 0:65004368569c 565 /*dynamically allocate memory for each instruction. That memory will need to be freed*/
AxedaCorp 0:65004368569c 566 /*When the status is complete */
AxedaCorp 0:65004368569c 567 /* */
AxedaCorp 0:65004368569c 568 /************************************************************************************/
AxedaCorp 0:65004368569c 569 int ax_pkg_addDLInstruction(ax_package *pkg, char *file_id, char *path, char *filename) {
AxedaCorp 0:65004368569c 570 int retVal=AX_UNKNOWN;
AxedaCorp 0:65004368569c 571 ax_package_instruction *curr=NULL;
AxedaCorp 0:65004368569c 572 ax_package_instruction *newInst=NULL;
AxedaCorp 0:65004368569c 573
AxedaCorp 0:65004368569c 574 newInst=(ax_package_instruction *)calloc(1, sizeof(ax_package_instruction));
AxedaCorp 0:65004368569c 575 retVal=ax_pkg_createPackageInstruction(newInst, AX_PKG_DOWNLOAD, file_id, path, filename);
AxedaCorp 0:65004368569c 576
AxedaCorp 0:65004368569c 577 if(pkg->instructions!=NULL) {
AxedaCorp 0:65004368569c 578 curr=pkg->instructions;
AxedaCorp 0:65004368569c 579 //Go to the end of the list
AxedaCorp 0:65004368569c 580 while(curr->next!=NULL) {
AxedaCorp 0:65004368569c 581 curr=curr->next;
AxedaCorp 0:65004368569c 582 }
AxedaCorp 0:65004368569c 583 curr->next=newInst;
AxedaCorp 0:65004368569c 584 }
AxedaCorp 0:65004368569c 585
AxedaCorp 0:65004368569c 586 else {
AxedaCorp 0:65004368569c 587 pkg->instructions=newInst;
AxedaCorp 0:65004368569c 588 }
AxedaCorp 0:65004368569c 589
AxedaCorp 0:65004368569c 590
AxedaCorp 0:65004368569c 591 return retVal;
AxedaCorp 0:65004368569c 592 }
AxedaCorp 0:65004368569c 593 /*************************************************************************************/
AxedaCorp 0:65004368569c 594 /*ax_pkg_destroyPackage() */
AxedaCorp 0:65004368569c 595 /* */
AxedaCorp 0:65004368569c 596 /*Free's lined package Instructions when created by the ax_pkg_add*() function. Be */
AxedaCorp 0:65004368569c 597 /*careful not to use this on a package with instructions that were manually declared */
AxedaCorp 0:65004368569c 598 /*This does not attempt to free the package itself as it may have been declared and */
AxedaCorp 0:65004368569c 599 /*not dynamically allocated. */
AxedaCorp 0:65004368569c 600 /************************************************************************************/
AxedaCorp 0:65004368569c 601 int ax_pkg_destroyPackage(ax_package *pkg) {
AxedaCorp 0:65004368569c 602 ax_package_instruction *curr=NULL;
AxedaCorp 0:65004368569c 603 ax_package_instruction *target=NULL;
AxedaCorp 0:65004368569c 604 curr=pkg->instructions;
AxedaCorp 0:65004368569c 605 while(curr!=NULL) {
AxedaCorp 0:65004368569c 606 target=curr; //We'll aim at the current node
AxedaCorp 0:65004368569c 607 curr=curr->next; //store the value for the next node
AxedaCorp 0:65004368569c 608 free(target); //kill the target node
AxedaCorp 0:65004368569c 609 }
AxedaCorp 0:65004368569c 610 return AX_OK;
AxedaCorp 0:65004368569c 611 }
AxedaCorp 0:65004368569c 612