Skip to content

Commit

Permalink
chore: added docs for dataUpload class (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui authored Nov 30, 2024
2 parents ca92bd0 + f1e3d7e commit 0f0cd2f
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions src/cellular/dataUpload.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,51 @@
*/
#define DU_UPLOAD_MAX_REATTEMPTS 5


class DataUpload : public Task{
public:
/**
* @class DataUpload
* @brief Handles the data upload task.
*
* This class implements the task methods and internal states
* required for data uploading.
*/
class DataUpload : public Task
{
public:
/**
* @brief Initializes the data upload task.
*/
void init(void);

/**
* @brief Executes the data upload task logic.
*
* @return The next state after executing the task.
*/
STATES_e run(void);

/**
* @brief Cleans up resources and exits the task.
*/
void exit(void);

private:
private:
//! Flag to indicate successful initialization.
int initSuccess;
//! Tracks the last connection attempt time.
system_tick_t lastConnectTime;

/**
* @brief State to transition to upon task exit.
*
* @return The exit state.
*/
STATES_e exitState(void);

/**
* @brief Checks if data can be uploaded.
*
* @return The current state indicating upload readiness.
*/
STATES_e can_upload(void);
};
#endif

0 comments on commit 0f0cd2f

Please sign in to comment.