/*
 * SataController.h
 *
 *  Created on: 8 mar 2022
 *      Author: chessaa
 */

#ifndef FILES_PUB_INC_SATACONTROLLER_H_
#define FILES_PUB_INC_SATACONTROLLER_H_


class SataController
{
public:
    static void setMaxSizeMbytes(unsigned int max_size_mbytes);
    static void setPath(const char* path);
    static void setFilePrefix(const char* prefix);

    static void setDate(unsigned int day, unsigned int month, unsigned int year, unsigned int sec_from_midnight);

    static void setRecording(bool rec=true);

    static bool isActive();

    static bool isRecording();
    static unsigned long recordedSize();

    static unsigned int recorderStatus();

    static void pollStatus();

    enum rec_ext_status_t
    {
        rs_unknown=0,
        rs_no_disk,
        rs_init,
        rs_rdy,
        rs_recording,
        rs_flush,
        rs_full,
        rs_err,

        rs_maintenance,

        res_rec_sts_mask=0x0FF,

        res_morc=(1<<31)
    };
    static unsigned int extRecorderStatus();

    static const char* recFile();

    static void updateStatus(const void* sts);

};


#endif /* FILES_PUB_INC_SATACONTROLLER_H_ */
