Master Controller MQTTStatus and DBStatus

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Master Controller MQTTStatus and DBStatus

'Neal Singh
Administrator

 

 Master Controller MQTTStatus and DBStatus

About the Status on MQTT these are on MQTT.h:
/********************* ERROR HANDLING ******************/
#define MQTT_NOT_CONNECTED_ERROR 0x01 // When the MQTT cant connect with the server
#define MQTT_NOT_PUBLISH_ERROR 0x02 // When a message couldn't be published
#define MQTT_DATA_CORRUPTED_ERROR 0x04 // When the incomming data has a bad STX, ETX
#define MQTT_STRUCT_DATABASE_WRONG_ERROR 0x08 // When the data pointer to databse struct is not rigth
#define MQTT_DIFFERENT_MAP_VERSION_ERROR 0x10 // When the incomming data doesnt match with the memory map version
#define MQTT_DEST_AND_SOURCE_DATA_DIFF_ERROR 0x20 // When the received data length is different to the destination in memory
#define MQTT_DIFFERENT_ID_NUMBER_ERROR 0x40 // When the incomming package has a different ID of mine

then the seccond status DB status is defined on DB_Proc.h
/********************* ERROR HANDLING ******************/
#define NO_MEMORY_SPACE_ERROR 0x0001 // When the end of the data exceds the limit for writing
#define ADDRESS_OUT_OF_MAP_ERROR 0x0002 // When the end of the data exceds the limit for reading
#define WRITE_EXT_MEMORY_ERROR 0x0004 // When a problem happens when is necessary to write the external memory
#define READ_EXT_MEMORY_ERROR 0x0008 // When a problem happens when is necessary to read the external memory
#define DOWNLOAD_TAG_ERROR 0x0010 // When a the TAGs cant be downloaded or the dimensions doesn't match
#define DATA_OUT_OF_SPACE_ERROR 0x0020 // When a data struct is trying to be stored outside of the assigned map
#define TAG_NOT_FOUND_ERROR 0x0040 // When a Information from a TAG is not found into the TAG List
#define TASK_INDEX_OUT_OF_BOUNDS 0x0080 // When is requested a Task but the index is out of bounds

 

image.png

 

 

 

MC Device Types

#define DEVICE_MODE_STATIONARY 0 // Without GPS
#define DEVICE_MODE_MOBILE 1 // With GPS
#define DEVICE_MODE_GENERATOR 2 // In Generator mode