Dummy Lora Packet Sending

Fork of Dealer_18feb17 by kumar singh

Revision:
21:a5fb0ae94dc6
Parent:
19:886d50ecc718
Child:
24:1063cfc311e5
--- a/Lora.h	Tue Feb 21 13:33:29 2017 +0000
+++ b/Lora.h	Wed Feb 22 14:59:59 2017 +0000
@@ -12,10 +12,11 @@
  
  #define HEART_BEAT_PACKET_CMD      0x01           //MSB,HeartBeat Identification Packet
  #define CHECKIN_PACKET_CMD         0x02           //MSB,CheckIn Identification Packet
- #define MOTION_PACKET_CMD          0x03           //MSB,Motion Identification Packet
- #define LOW_BATTERY_PACKET_CMD     0x04           //MSB,Low Battery Identification Packet
- #define STATUS_PACKET_CMD          0x05           //MSB,Status Packet
- #define NEW_DEV_PACKET_CMD         0x06           //MSB,New Device Identification Packet
+ #define CHECKOUT_PACKET_CMD        0x03           //MSB,CheckIn Identification Packet
+ #define MOTION_PACKET_CMD          0x04           //MSB,Motion Identification Packet
+ #define LOW_BATTERY_PACKET_CMD     0x05           //MSB,Low Battery Identification Packet
+ #define STATUS_PACKET_CMD          0x06           //MSB,Status Packet
+ #define NEW_DEV_PACKET_CMD         0x07           //MSB,New Device Identification Packet
 
 
  //Lora Frequency SubBand
@@ -74,61 +75,63 @@
 
 struct Misc_Packets
 {
+    uint8 Header;
     uint8 Protocol_Version;
     uint16 OBD_Battery_Voltage;
     uint16 Car_Battery_Voltage;
     uint8 OBD_Battery_Temperature;
     uint8 Car_Ambient_Temperature;
-    uint8 VIN[17];
+    uint8 VIN[17];                  //Vehicle Identification Number
     uint8 ODO_METER_READING[3];
 };
 
 struct Heart_Beat_PacketType
 {
-    uint8 Header;
     Misc_Packets Misc_Packet_Data;
     uint8 Packet_Type;
     Fixed_Beacon Fixed_Beacon_Packet;
+    uint8 Sequence_No;
     uint8 FCS;
 };
 
 struct Vehicle_Status_PacketType
 {
-    uint8 Header;
     Misc_Packets Misc_Packet_Data;
     uint8 Packet_Type;
     uint16 Fuel_Level;
     uint8 BLE_Adv_Beacon_ID[6];
     Fixed_Beacon Fixed_Beacon_Packet;
     Near_Car_Beacon Near_Car_Beacon_Packet;
+    uint8 Sequence_No;
     uint8 FCS;
 };
 
 struct CheckIN_PacketType
 {
-    uint8 Header;
     Misc_Packets Misc_Packet_Data;
     uint8 Packet_Type;
+    uint8 DTC[5];   //Diagnostic trouble code
     Fixed_Beacon Fixed_Beacon_Packet;
+    uint8 Sequence_No;
     uint8 FCS;
 };
 
 struct CheckOUT_PacketType
 {
-    uint8 Header;
     Misc_Packets Misc_Packet_Data;
     uint8 Packet_Type;
+    uint8 Sequence_No;
     uint8 FCS;
 };
 
 struct Motion_PacketType
 {
-    uint8 Header;
     Misc_Packets Misc_Packet_Data;
     uint8 Packet_Type;
     Fixed_Beacon Fixed_Beacon_Packet;
     Near_Car_Beacon Near_Car_Beacon_Packet;
     uint8 Acceleration_Type;
+    uint8 Sequence_No;
     uint8 FCS;
 };