@ -33,31 +33,31 @@ 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					// prototypes
 // prototypes
  
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcYieldTotalCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcYieldTotalCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcYieldDayCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcYieldDayCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcUdcCh ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcUdcCh ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcPowerDcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcPowerDcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcEffiencyCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcEffiencyCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcIrradiation ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcIrradiation ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcMaxPowerAcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcMaxPowerAcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcMaxTempCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcMaxTempCh0 ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcMaxPowerDc ( Inverter < >  * iv ,  uint8_t  arg0 ) ; T  calcMaxPowerDc ( Inverter < >  * iv ,  uint8_t  arg0 ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					using  func_t  =  T  ( Inverter < >  * ,  uint8_t ) ; using  func_t  =  T  ( Inverter < >  * ,  uint8_t ) ;  
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -275,7 +275,8 @@ class Inverter { 
			
		
	
		
		
			
				
					            if ( InverterStatus : : OFF  ! =  status )  {             if ( InverterStatus : : OFF  ! =  status )  {  
			
		
	
		
		
			
				
					                mDevControlRequest  =  true ;                 mDevControlRequest  =  true ;  
			
		
	
		
		
			
				
					                devControlCmd  =  cmd ;                 devControlCmd  =  cmd ;  
			
		
	
		
		
			
				
					
					                //app->triggerTickSend(); // done in RestApi.h, because of "chicken-and-egg problem ;-)"
                 //assert(App);
  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                //App->triggerTickSend(0);
  
			
		
	
		
		
			
				
					            }             }  
			
		
	
		
		
			
				
					            return  ( InverterStatus : : OFF  ! =  status ) ;             return  ( InverterStatus : : OFF  ! =  status ) ;  
			
		
	
		
		
			
				
					        }         }  
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -823,6 +824,7 @@ class Inverter { 
			
		
	
		
		
			
				
					    public :     public :  
			
		
	
		
		
			
				
					        static  uint32_t   * timestamp ;      // system timestamp
         static  uint32_t   * timestamp ;      // system timestamp
  
			
		
	
		
		
			
				
					        static  cfgInst_t  * generalConfig ;  // general inverter configuration from setup
         static  cfgInst_t  * generalConfig ;  // general inverter configuration from setup
  
			
		
	
		
		
			
				
					        static  IApp  * App ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					        uint16_t  mDtuRxCnt  =  0 ;         uint16_t  mDtuRxCnt  =  0 ;  
			
		
	
		
		
			
				
					        uint16_t  mDtuTxCnt  =  0 ;         uint16_t  mDtuTxCnt  =  0 ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -843,6 +845,8 @@ template <class REC_TYP> 
			
		
	
		
		
			
				
					uint32_t  * Inverter < REC_TYP > : : timestamp  { 0 } ; uint32_t  * Inverter < REC_TYP > : : timestamp  { 0 } ;  
			
		
	
		
		
			
				
					template  < class  REC_TYP > template  < class  REC_TYP >  
			
		
	
		
		
			
				
					cfgInst_t  * Inverter < REC_TYP > : : generalConfig  { 0 } ; cfgInst_t  * Inverter < REC_TYP > : : generalConfig  { 0 } ;  
			
		
	
		
		
			
				
					template  < class  REC_TYP >  
			
		
	
		
		
			
				
					IApp  * Inverter < REC_TYP > : : App  { nullptr } ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					/**
 /**
  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -852,7 +856,7 @@ cfgInst_t *Inverter<REC_TYP>::generalConfig {0}; 
			
		
	
		
		
			
				
					 */  */  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcYieldTotalCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcYieldTotalCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcYieldTotalCh0 " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcYieldTotalCh0 " ) ) ;  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
		
		
			
				
					        record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;         record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -866,7 +870,7 @@ static T calcYieldTotalCh0(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcYieldDayCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcYieldDayCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcYieldDayCh0 " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcYieldDayCh0 " ) ) ;  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
		
		
			
				
					        record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;         record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -880,7 +884,7 @@ static T calcYieldDayCh0(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcUdcCh ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcUdcCh ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcUdcCh " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcUdcCh " ) ) ;  
			
		
	
		
		
			
				
					    // arg0 = channel of source
     // arg0 = channel of source
  
			
		
	
		
		
			
				
					    record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;     record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -894,7 +898,7 @@ static T calcUdcCh(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcPowerDcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcPowerDcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcPowerDcCh0 " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcPowerDcCh0 " ) ) ;  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
		
		
			
				
					        record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;         record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -908,7 +912,7 @@ static T calcPowerDcCh0(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcEffiencyCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcEffiencyCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcEfficiencyCh0 " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcEfficiencyCh0 " ) ) ;  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
		
		
			
				
					        record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;         record_t < >  * rec  =  iv - > getRecordStruct ( RealTimeRunData_Debug ) ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -924,7 +928,7 @@ static T calcEffiencyCh0(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcIrradiation ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcIrradiation ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcIrradiation " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcIrradiation " ) ) ;  
			
		
	
		
		
			
				
					    // arg0 = channel
     // arg0 = channel
  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -936,7 +940,7 @@ static T calcIrradiation(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcMaxPowerAcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcMaxPowerAcCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcMaxPowerAcCh0 " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcMaxPowerAcCh0 " ) ) ;  
			
		
	
		
		
			
				
					    T  acMaxPower  =  0.0 ;     T  acMaxPower  =  0.0 ;  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -957,7 +961,7 @@ static T calcMaxPowerAcCh0(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcMaxTempCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcMaxTempCh0 ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcMaxTempCh0 " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcMaxTempCh0 " ) ) ;  
			
		
	
		
		
			
				
					    T  maxTemp  =  0.0 ;     T  maxTemp  =  0.0 ;  
			
		
	
		
		
			
				
					    if ( NULL  ! =  iv )  {     if ( NULL  ! =  iv )  {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -979,7 +983,7 @@ static T calcMaxTempCh0(Inverter<> *iv, uint8_t arg0) { 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					template < class  T = float > template < class  T = float >  
			
		
	
		
		
			
				
					
					static  T  calcMaxPowerDc ( Inverter < >  * iv ,  uint8_t  arg0 )  { T  calcMaxPowerDc ( Inverter < >  * iv ,  uint8_t  arg0 )  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcMaxPowerDc " ) ) ;     DPRINTLN ( DBG_VERBOSE ,  F ( " hmInverter.h:calcMaxPowerDc " ) ) ;  
			
		
	
		
		
			
				
					    // arg0 = channel
     // arg0 = channel
  
			
		
	
		
		
			
				
					    T  dcMaxPower  =  0.0 ;     T  dcMaxPower  =  0.0 ;