LoboMQ
Loading...
Searching...
No Matches
BrokerSDUtils.h File Reference
#include <array>
#include <freertos/FreeRTOS.h>
#include <freertos/semphr.h>
#include <FS.h>
#include <vector>
#include <ArduinoJson.h>
#include "commons/Includes.h"
#include "BrokerTopic.h"

Go to the source code of this file.

Macros

#define FILE_PATH   "/LoboMQ/topics"
 
#define FILE_FORMAT   ".json"
 

Functions

String replaceChars (const char *str)
 
bool initializeSDCard (int csPin, Elog *logger, SemaphoreHandle_t *mutex, TickType_t delay=portMAX_DELAY)
 
void restoreBTs (std::vector< BrokerTopic > *topicsVector, Elog *logger, SemaphoreHandle_t *mutex, TickType_t delay=portMAX_DELAY)
 
void writeBTToFile (BrokerTopic *brokerTopic, Elog *logger, SemaphoreHandle_t *mutex, TickType_t delay=portMAX_DELAY)
 
void deleteBTFile (const char *filename, Elog *logger, SemaphoreHandle_t *mutex, TickType_t delay=portMAX_DELAY)
 

Detailed Description

Author
Rubén Gómez Villegas

This file contains the necessary definitions and declarations to manage BrokerTopic objects on the SD card for LoboMQ.

Definition in file BrokerSDUtils.h.

Macro Definition Documentation

◆ FILE_FORMAT

#define FILE_FORMAT   ".json"

Definition at line 25 of file BrokerSDUtils.h.

◆ FILE_PATH

#define FILE_PATH   "/LoboMQ/topics"

Definition at line 24 of file BrokerSDUtils.h.

Function Documentation

◆ deleteBTFile()

void deleteBTFile ( const char * filename,
Elog * logger,
SemaphoreHandle_t * mutex,
TickType_t delay = portMAX_DELAY )

Definition at line 154 of file BrokerSDUtils.cpp.

◆ initializeSDCard()

bool initializeSDCard ( int csPin,
Elog * logger,
SemaphoreHandle_t * mutex,
TickType_t delay = portMAX_DELAY )

Definition at line 34 of file BrokerSDUtils.cpp.

◆ replaceChars()

String replaceChars ( const char * str)

Definition at line 11 of file BrokerSDUtils.cpp.

◆ restoreBTs()

void restoreBTs ( std::vector< BrokerTopic > * topicsVector,
Elog * logger,
SemaphoreHandle_t * mutex,
TickType_t delay = portMAX_DELAY )

Definition at line 69 of file BrokerSDUtils.cpp.

◆ writeBTToFile()

void writeBTToFile ( BrokerTopic * brokerTopic,
Elog * logger,
SemaphoreHandle_t * mutex,
TickType_t delay = portMAX_DELAY )

Definition at line 124 of file BrokerSDUtils.cpp.