MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/systemic/StatusLogger.hh
2024-06-07 11:12:56 +03:00

40 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* StatusLogger.hh
*
* Created on: 31 мар. 2021 г.
* Author: titov
*/
#ifndef UMLIBRARY_SYSTEMIC_STATUSLOGGER_HH_
#define UMLIBRARY_SYSTEMIC_STATUSLOGGER_HH_
#include "StatusManager.hh"
#include "../logging/ILoggable.hh"
namespace systemic {
//!Логирует ошибки доступа к ресурсам - статусы.
class StatusLogger : public StatusManager, public logging::ILoggable {
virtual Record & search( Id id ) const;
//!Ошибка доступа.
struct ErrorMessage {
Id status; //!<Идентификатор запроса.
};
//!Ошибка размещения.
struct CriticalMessage {
Id status; //!<Идентификатор запроса.
};
public:
StatusLogger( Record * recods, std::size_t size, std::pmr::memory_resource* allocator, NotificationInterface & herald = getDefault() );
virtual bool add( Id id, InterfaceType * interface, InterfaceOverrideType * override = nullptr, volatile const Type * value = nullptr ) override;
};
}
#endif /* UMLIBRARY_SYSTEMIC_STATUSLOGGER_HH_ */