SEElectricalCircuitNode.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/circuit/SECircuitNode.h"
8
9class CDM_DECL SEElectricalCircuitNode : public SECircuitNode<ELECTRICAL_CIRCUIT_NODE>
10{
11 friend class PBCircuit;//friend the serialization class
12 friend class SECircuitManager;
13protected:
14 SEElectricalCircuitNode(const std::string& name, Logger* logger);
15public:
17
18 void Clear() override; //clear memory
19
20public:
21 virtual bool HasVoltage() const;
22 virtual SEScalarElectricPotential& GetVoltage();
23 virtual double GetVoltage(const ElectricPotentialUnit& unit) const;
24
25 virtual bool HasNextVoltage() const;
26 virtual SEScalarElectricPotential& GetNextVoltage();
27 virtual double GetNextVoltage(const ElectricPotentialUnit& unit) const;
28
29
30 virtual bool HasCharge() const;
31 virtual SEScalarElectricCharge& GetCharge();
32 virtual double GetCharge(const ElectricChargeUnit& unit) const;
33
34 virtual bool HasNextCharge() const;
35 virtual SEScalarElectricCharge& GetNextCharge();
36 virtual double GetNextCharge(const ElectricChargeUnit& unit) const;
37
38 virtual bool HasChargeBaseline() const;
39 virtual SEScalarElectricCharge& GetChargeBaseline();
40 virtual double GetChargeBaseline(const ElectricChargeUnit& unit) const;
41
42 SEElectricalCircuitNode* GetBlackBoxSourceNode() const;
43 SEElectricalCircuitNode* GetBlackBoxTargetNode() const;
44 void SetBlackBoxSourceTargetNodes(SEElectricalCircuitNode& src, SEElectricalCircuitNode& tgt);
45
46 SEElectricalCircuitPath* GetBlackBoxSourcePath() const;
47 SEElectricalCircuitPath* GetBlackBoxTargetPath() const;
48 void SetBlackBoxSourceTargetPaths(SEElectricalCircuitPath& src, SEElectricalCircuitPath& tgt);
49
50protected:
51 SEElectricalCircuitNode* m_BlackBoxSourceNode=nullptr;// Only set on middle nodes
52 SEElectricalCircuitNode* m_BlackBoxTargetNode=nullptr;// Only set on middle nodes
53 SEElectricalCircuitPath* m_BlackBoxSourcePath = nullptr;// Only set on middle nodes
54 SEElectricalCircuitPath* m_BlackBoxTargetPath = nullptr;// Only set on middle nodes
55};
Definition: SEScalarElectricCharge.h:8
Definition: SEScalarElectricPotential.h:8
Definition: Logger.h:71
Definition: PBCircuit.h:26
Definition: SECircuitManager.h:38
Definition: SECircuitNode.h:31
virtual void Clear()
Definition: SEElectricalBlackBox.h:11
Definition: SEElectricalCircuitNode.h:10
Definition: SEElectricalCircuitPath.h:9
Definition: SEScalarElectricCharge.h:24
Definition: SEScalarElectricPotential.h:25

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.