Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::channels::AbstractChannel Class Referenceabstract

#include <AbstractChannel.hpp>

Inheritance diagram for iv::channels::AbstractChannel:
[legend]
Collaboration diagram for iv::channels::AbstractChannel:
[legend]

Classes

struct  DefaultValues
 
struct  Keys
 
struct  Sections
 

Public Member Functions

virtual ~AbstractChannel ()=default
 
virtual void update (AbstractChannel &other)
 
virtual bool load (const iv::file::xml::node &nodeChannel)
 
virtual bool save (iv::file::xml::node &nodeChannel) const
 
virtual std::shared_ptr< AbstractChannelclone ()=0
 
void deinitialize ()
 
virtual void processAlarm (std::shared_ptr< iv::alarms::AlarmsManager > alarmManager)=0
 
virtual void processValue ()=0
 
void setValue (std::optional< iv::types::channelValue > value, const std::optional< iv::alarms::Alarm > &alarm, const std::optional< iv::types::networkId > &networkOrigin)
 
virtual void calculateAlarm ()
 
template<typename T >
requires std::is_same_v<T, bool> || std::is_same_v<T, int32_t> || std::is_same_v<T, uint32_t> || std::is_same_v<T, float> || std::is_same_v<T, uint64_t> || std::is_same_v<T, double> || std::is_same_v<T, std::string> || std::is_same_v<T, const char *>
getValue () const
 
iv::types::channelValue getRawData () const
 
virtual std::string getRawDataUnit () const
 
const iv::types::channelIdgetChannelId () const
 
iv::types::channelOrder getChannelOrder () const
 
const iv::channels::ChannelAlarmParametersgetAlarmParameters () const
 
const std::map< iv::types::networkId, std::shared_ptr< iv::channels::INetworkInfo > > & channelsNetwork () const
 
bool isWired () const
 
bool isVirtual () const
 
bool isAnalog () const
 
bool isDigital () const
 
bool isString () const
 
bool isSerialLine () const
 
bool isAlarmCalculated () const
 
bool hasValue () const
 
std::string getAlarmIconName () const
 
iv::types::color getColorStateRgb () const
 
iv::alarms::eAlarmPriority getAlarmPriority () const
 
iv::alarms::eAlarmState getAlarmState () const
 
iv::alarms::eAlarmType getAlarmType () const
 TODO: Por defecto tal vez debería haber un undefined o algo así, pq en detalles del canal se dibuja — cd no es valido.
 
iv::channels::eInhibitionCondition getInhibitionConditionState () const
 
std::weak_ptr< iv::units::UnitgetUnit () const
 
virtual std::string getEngineeringUnitsStr () const
 
virtual std::string formatValue () const =0
 
virtual iv::channels::FormattedValue formattedValue () const =0
 

Public Attributes

iv::types::channelId m_tag
 
std::string m_shipyardTag
 
iv::types::channelOrder m_channelOrder
 
bool m_isEnabled
 
std::weak_ptr< AbstractChannelm_inhibitionChannel
 
iv::channels::eChannelBaseType m_baseType
 
iv::channels::eChannelSpecificType m_specificType
 
iv::channels::eChannelArea m_area
 
iv::channels::ChannelInfo m_info
 
iv::channels::ChannelAlarmParameters m_alarmParameters
 
iv::model::diamar::eVerificationStatus m_verificationStatus
 
std::map< iv::types::networkId, std::shared_ptr< iv::channels::INetworkInfo > > m_channelsNetwork
 
std::mutex m_mutexUpdate
 
std::atomic< iv::channels::Valuem_value
 
std::atomic< iv::alarms::Alarmm_alarm
 
std::optional< iv::types::networkIdm_networkOrigin {}
 
std::optional< iv::types::stationIdm_stationOrigin {}
 
std::atomic< iv::channels::Valuem_lastReceivedValue
 
std::atomic< iv::alarms::Alarmm_lastReceivedAlarm
 
std::optional< iv::types::networkIdm_lastNetworkOrigin {}
 
std::optional< iv::types::stationIdm_lastStationOrigin {}
 
std::atomic< bool > m_shouldCalculateAlarm
 
std::unique_ptr< iv::channels::controller::AbstractChannelm_controller
 
iv::types::unitId m_idUnit
 
iv::types::indexChannel m_indexChannel
 
iv::types::milliseconds m_deinitTimeout {DefaultValues::deinitTimeout}
 

Protected Member Functions

 AbstractChannel ()
 
 AbstractChannel (const AbstractChannel &other)
 
bool shouldStoreAlarm (iv::alarms::Alarm &alarm) const
 
virtual iv::types::channelValue setRawData (iv::types::channelValue value)
 

Friends

class iv::channels::controller::AbstractChannel
 

Constructor & Destructor Documentation

◆ ~AbstractChannel()

virtual iv::channels::AbstractChannel::~AbstractChannel ( )
virtualdefault

◆ AbstractChannel() [1/2]

◆ AbstractChannel() [2/2]

Member Function Documentation

◆ calculateAlarm()

void iv::channels::AbstractChannel::calculateAlarm ( )
virtual

◆ channelsNetwork()

const std::map< iv::types::networkId, std::shared_ptr< iv::channels::INetworkInfo > > & iv::channels::AbstractChannel::channelsNetwork ( ) const
nodiscard

◆ clone()

virtual std::shared_ptr< AbstractChannel > iv::channels::AbstractChannel::clone ( )
pure virtual

◆ deinitialize()

void iv::channels::AbstractChannel::deinitialize ( )

◆ formattedValue()

virtual iv::channels::FormattedValue iv::channels::AbstractChannel::formattedValue ( ) const
nodiscardpure virtual

◆ formatValue()

virtual std::string iv::channels::AbstractChannel::formatValue ( ) const
nodiscardpure virtual

◆ getAlarmIconName()

std::string iv::channels::AbstractChannel::getAlarmIconName ( ) const
nodiscard

◆ getAlarmParameters()

const iv::channels::ChannelAlarmParameters & iv::channels::AbstractChannel::getAlarmParameters ( ) const
nodiscard

◆ getAlarmPriority()

iv::alarms::eAlarmPriority iv::channels::AbstractChannel::getAlarmPriority ( ) const
nodiscard

◆ getAlarmState()

iv::alarms::eAlarmState iv::channels::AbstractChannel::getAlarmState ( ) const
nodiscard

◆ getAlarmType()

iv::alarms::eAlarmType iv::channels::AbstractChannel::getAlarmType ( ) const
nodiscard

TODO: Por defecto tal vez debería haber un undefined o algo así, pq en detalles del canal se dibuja — cd no es valido.

◆ getChannelId()

const iv::types::channelId & iv::channels::AbstractChannel::getChannelId ( ) const
nodiscard

◆ getChannelOrder()

iv::types::channelOrder iv::channels::AbstractChannel::getChannelOrder ( ) const
nodiscard

◆ getColorStateRgb()

iv::types::color iv::channels::AbstractChannel::getColorStateRgb ( ) const
nodiscard

◆ getEngineeringUnitsStr()

std::string iv::channels::AbstractChannel::getEngineeringUnitsStr ( ) const
nodiscardvirtual

Reimplemented in iv::channels::AnalogChannel.

◆ getInhibitionConditionState()

iv::channels::eInhibitionCondition iv::channels::AbstractChannel::getInhibitionConditionState ( ) const
nodiscard

◆ getRawData()

iv::types::channelValue iv::channels::AbstractChannel::getRawData ( ) const

◆ getRawDataUnit()

std::string iv::channels::AbstractChannel::getRawDataUnit ( ) const
virtual

Reimplemented in iv::channels::WiredAnalog.

◆ getUnit()

std::weak_ptr< iv::units::Unit > iv::channels::AbstractChannel::getUnit ( ) const
nodiscard

◆ getValue()

template<typename T >
requires std::is_same_v<T, bool> || std::is_same_v<T, int32_t> || std::is_same_v<T, uint32_t> || std::is_same_v<T, float> || std::is_same_v<T, uint64_t> || std::is_same_v<T, double> || std::is_same_v<T, std::string> || std::is_same_v<T, const char *>
T iv::channels::AbstractChannel::getValue ( ) const

◆ hasValue()

bool iv::channels::AbstractChannel::hasValue ( ) const
nodiscard

◆ isAlarmCalculated()

bool iv::channels::AbstractChannel::isAlarmCalculated ( ) const

◆ isAnalog()

bool iv::channels::AbstractChannel::isAnalog ( ) const
nodiscard

◆ isDigital()

bool iv::channels::AbstractChannel::isDigital ( ) const
nodiscard

◆ isSerialLine()

bool iv::channels::AbstractChannel::isSerialLine ( ) const

◆ isString()

bool iv::channels::AbstractChannel::isString ( ) const
nodiscard

◆ isVirtual()

bool iv::channels::AbstractChannel::isVirtual ( ) const
nodiscard

◆ isWired()

bool iv::channels::AbstractChannel::isWired ( ) const
nodiscard

◆ load()

◆ processAlarm()

virtual void iv::channels::AbstractChannel::processAlarm ( std::shared_ptr< iv::alarms::AlarmsManager > alarmManager)
pure virtual

◆ processValue()

virtual void iv::channels::AbstractChannel::processValue ( )
pure virtual

◆ save()

◆ setRawData()

iv::types::channelValue iv::channels::AbstractChannel::setRawData ( iv::types::channelValue value)
protectedvirtual

◆ setValue()

void iv::channels::AbstractChannel::setValue ( std::optional< iv::types::channelValue > value,
const std::optional< iv::alarms::Alarm > & alarm,
const std::optional< iv::types::networkId > & networkOrigin )

◆ shouldStoreAlarm()

bool iv::channels::AbstractChannel::shouldStoreAlarm ( iv::alarms::Alarm & alarm) const
protected

◆ update()

Friends And Related Symbol Documentation

◆ iv::channels::controller::AbstractChannel

Member Data Documentation

◆ m_alarm

std::atomic<iv::alarms::Alarm> iv::channels::AbstractChannel::m_alarm

◆ m_alarmParameters

iv::channels::ChannelAlarmParameters iv::channels::AbstractChannel::m_alarmParameters

◆ m_area

iv::channels::eChannelArea iv::channels::AbstractChannel::m_area

◆ m_baseType

iv::channels::eChannelBaseType iv::channels::AbstractChannel::m_baseType

◆ m_channelOrder

iv::types::channelOrder iv::channels::AbstractChannel::m_channelOrder

◆ m_channelsNetwork

std::map<iv::types::networkId, std::shared_ptr<iv::channels::INetworkInfo> > iv::channels::AbstractChannel::m_channelsNetwork

◆ m_controller

std::unique_ptr<iv::channels::controller::AbstractChannel> iv::channels::AbstractChannel::m_controller

◆ m_deinitTimeout

iv::types::milliseconds iv::channels::AbstractChannel::m_deinitTimeout {DefaultValues::deinitTimeout}

◆ m_idUnit

iv::types::unitId iv::channels::AbstractChannel::m_idUnit

Info redundant for performance

◆ m_indexChannel

iv::types::indexChannel iv::channels::AbstractChannel::m_indexChannel

◆ m_info

iv::channels::ChannelInfo iv::channels::AbstractChannel::m_info

◆ m_inhibitionChannel

std::weak_ptr<AbstractChannel> iv::channels::AbstractChannel::m_inhibitionChannel

◆ m_isEnabled

bool iv::channels::AbstractChannel::m_isEnabled

◆ m_lastNetworkOrigin

std::optional<iv::types::networkId> iv::channels::AbstractChannel::m_lastNetworkOrigin {}

◆ m_lastReceivedAlarm

std::atomic<iv::alarms::Alarm> iv::channels::AbstractChannel::m_lastReceivedAlarm

◆ m_lastReceivedValue

std::atomic<iv::channels::Value> iv::channels::AbstractChannel::m_lastReceivedValue

◆ m_lastStationOrigin

std::optional<iv::types::stationId> iv::channels::AbstractChannel::m_lastStationOrigin {}

◆ m_mutexUpdate

std::mutex iv::channels::AbstractChannel::m_mutexUpdate

Controller

◆ m_networkOrigin

std::optional<iv::types::networkId> iv::channels::AbstractChannel::m_networkOrigin {}

◆ m_shipyardTag

std::string iv::channels::AbstractChannel::m_shipyardTag

◆ m_shouldCalculateAlarm

std::atomic<bool> iv::channels::AbstractChannel::m_shouldCalculateAlarm

◆ m_specificType

iv::channels::eChannelSpecificType iv::channels::AbstractChannel::m_specificType

◆ m_stationOrigin

std::optional<iv::types::stationId> iv::channels::AbstractChannel::m_stationOrigin {}

◆ m_tag

iv::types::channelId iv::channels::AbstractChannel::m_tag

◆ m_value

std::atomic<iv::channels::Value> iv::channels::AbstractChannel::m_value

◆ m_verificationStatus

iv::model::diamar::eVerificationStatus iv::channels::AbstractChannel::m_verificationStatus

The documentation for this class was generated from the following files: