56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
/*
|
||
* PlatformValues.hh
|
||
*
|
||
* Created on: 29 июл. 2021 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_SYSTEMIC_PLATFORMVALUES_HH_
|
||
#define UMLIBRARY_SYSTEMIC_PLATFORMVALUES_HH_
|
||
|
||
#include "ISignal.hh"
|
||
#include "IStatus.hh"
|
||
|
||
#include <cstddef>
|
||
#include <utility>
|
||
|
||
namespace systemic {
|
||
|
||
class StatusImpl : public systemic::IStatus {
|
||
|
||
std::pair<const char *, std::size_t> (* platform_info)( std::size_t info_id );
|
||
std::size_t id;
|
||
std::size_t offset;
|
||
|
||
mutable bool value;
|
||
|
||
public:
|
||
operator bool() const;
|
||
StatusImpl( std::pair<const char *, std::size_t> (* platform_info)( std::size_t info_id ),
|
||
std::size_t info_id,
|
||
std::size_t offset );
|
||
|
||
};
|
||
|
||
class SignalImpl : public systemic::ISignal {
|
||
|
||
std::pair<const char *, std::size_t> (* platform_info)( std::size_t info_id );
|
||
std::size_t id;
|
||
std::size_t offset;
|
||
|
||
mutable float value;
|
||
|
||
public:
|
||
operator float() const;
|
||
SignalImpl( std::pair<const char *, std::size_t> (* platform_info)( std::size_t info_id ),
|
||
std::size_t info_id,
|
||
std::size_t offset );
|
||
|
||
};
|
||
|
||
}
|
||
|
||
|
||
|
||
#endif /* UMLIBRARY_SYSTEMIC_PLATFORMVALUES_HH_ */
|