Skip to content

Commit

Permalink
01.11.0 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
akkoyun committed Mar 14, 2024
1 parent 02d3940 commit a7f2577
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 47 deletions.
32 changes: 21 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,11 @@ All notable changes to this project will be documented in this file. The format

### Added

- No aditional library is used anymore. All used dependencies are writen by me.
- JSON functions are added. These functions are used to parse the JSON data.
- Variables are now controlled by the library. This is used to control the variables in the library.
- Downloaded firmware is now MD5 checked. This is used for checking the downloaded firmware.
- Modem function added. This function is used to ON/OFF the modem.
- Modem function is alse used for controling the modem's power.
- Disconnect function added. This function is used to disconnect the device from the cloud.
- ...

### Changed

- Cloud function name is changed to Connect.
- Listen function is moved to public function.
- Firewall function is moved to public function.
- Syncronize_Time function is moved to public function.
- ...

### Removed

Expand All @@ -44,6 +35,25 @@ All notable changes to this project will be documented in this file. The format

---

## [1.11.0]

- No aditional library is used anymore. All used dependencies are writen by me.
- JSON functions are added. These functions are used to parse the JSON data.
- Variables are now controlled by the library. This is used to control the variables in the library.
- Downloaded firmware is now MD5 checked. This is used for checking the downloaded firmware.
- Modem function added. This function is used to ON/OFF the modem.
- Modem function is alse used for controling the modem's power.
- Disconnect function added. This function is used to disconnect the device from the cloud.

- Cloud function name is changed to Connect.
- Listen function is moved to public function.
- Firewall function is moved to public function.
- Syncronize_Time function is moved to public function.
- Interrupt_Handler and JSON_Parser functions are moved to protected functions.
- Status variable is moved to private variable.

---

## [1.10.0] - 2024-03-13

* Initial updates and first stable version. Detailed documentation is start from these release.
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PostMan",
"version": "1.10.1",
"version": "1.11.0",
"keywords": "GSM, Modem, GPRS, 2G, IoT, Telit, GE910, LE910, Backend, Cloud, PostOffice, API",
"description": "GSM Based IoT, Cloud Server Integration Library.",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PostOffice
version=1.10.1
version=1.11.0
author=Gunce Akkoyun <[email protected]>
maintainer=Gunce Akkoyun <[email protected]>
sentence=GSM Based IoT, Cloud Server Integration Library.
Expand Down
79 changes: 45 additions & 34 deletions src/PostMan.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
uint8_t Time_Zone = 0;
} Time;

// Define Variables
uint8_t Status = 0x00;

// Clear Variables
void Clear_Variables(void) {

Expand Down Expand Up @@ -204,17 +207,25 @@
}

// Remove Spaces from Char Array
void Remove_Spaces(char *str) {
void Remove_Spaces(char * _Buffer) {

// Declare Buffer Variables
char * _Source = _Buffer;
char * _Desitination = _Buffer;

// Loop for Buffer
while (* _Source) {

// Control for Space
if (* _Source != ' ') * _Desitination++ = * _Source;

// Increment Source
_Source++;

char *src = str;
char *dst = str;
while (*src) {
if (*src != ' ') {
*dst++ = *src;
}
src++;
}
*dst = '\0';

// Set End of Buffer
* _Desitination = '\0';

}

Expand Down Expand Up @@ -416,9 +427,8 @@
// "RSSI": 69,
// "WDS": 25,
// "ConnTime": 1.978,
// "TAC": 2242,
// "LAC": 0,
// "Cell_ID": 11915553
// "MCC": 286,
// "MNC": 1
// }

// Declare ConnTime Buffer
Expand Down Expand Up @@ -498,6 +508,9 @@
// Protected Context
protected:

// Define Instance
static Postman* Instance;

// Initalize GSM Module
bool Initialize(void) {

Expand Down Expand Up @@ -2165,22 +2178,7 @@

}

// Public Context
public:

// Define Instance
static Postman* Instance;

// Define Variables
uint8_t Status = 0x00;

// PCMSK1 Mask Handler Function
static void Interrupt_Handler_Static(void) {

// Set Interrupt Handler
if (Instance) Instance->Interrupt_Handler();

}
void Interrupt_Handler(void) {

// Set Interrupt Handler
Expand All @@ -2189,12 +2187,6 @@
}

// JSON Parser Handler Function
static void JSON_Parser_Static(void) {

// Set Interrupt Handler
if (Instance) Instance->JSON_Parser();

}
void JSON_Parser(void) {

// Declare JSON Size
Expand Down Expand Up @@ -2268,6 +2260,25 @@

}

// Public Context
public:

// PCMSK1 Mask Handler Function
static void Interrupt_Handler_Static(void) {

// Set Interrupt Handler
if (Instance) Instance->Interrupt_Handler();

}

// JSON Parser Handler Function
static void JSON_Parser_Static(void) {

// Set Interrupt Handler
if (Instance) Instance->JSON_Parser();

}

// PostMan Constructor
Postman(Stream &_Serial, B107AA* _B107AA, Variable<float>* _Variable, PowerStat_Console* _Terminal) : LE910C1_EUX(_Serial), Hardware(_B107AA), Payload(_Variable), Terminal(_Terminal) {

Expand Down Expand Up @@ -2957,7 +2968,7 @@
}

// Send Data Batch Function
bool Publish(const uint8_t _Pack_Type) {
bool Publish(const uint8_t _Pack_Type = Pack_Update) {

// Control for Modem Connection
if (bitRead(this->Status, PostMan_Status_Connection)) {
Expand Down

0 comments on commit a7f2577

Please sign in to comment.