LIBSUNSPEC  v0.1.6
A C++ library for the SunSpec protocol
FroniusRegister Class Reference

Class to manipulate Fronius specific registers. More...

#include <FroniusRegister.h>

Inheritance diagram for FroniusRegister:
SunSpec FroniusInverter FroniusMeter

Data Structures

struct  ModelType_t
 

Public Member Functions

bool GetActiveStateCode (uint16_t &code)
 
bool ResetEventFlags (void)
 
bool GetModelType (struct ModelType_t &model)
 
bool SetModelType (const int &value=1)
 
bool GetSitePower (double &res)
 
bool GetSiteEnergyDay (double &res)
 
bool GetSiteEnergyYear (double &res)
 
bool GetSiteEnergyTotal (double &res)
 
- Public Member Functions inherited from SunSpec
 SunSpec (void)
 
virtual ~SunSpec (void)
 
std::string GetErrorMessage (void) const
 
bool ConnectModbusTcp (const std::string &node, const std::string &service="502")
 
bool ConnectModbusRtu (const std::string &device, const int &baud_rate=9600)
 
void SetModbusDebug (const bool &debug)
 
bool SetModbusAddress (const int &slave_id=1)
 
bool GetModbusAddress (int &slave_id)
 
bool SetResponseTimeout (const int &millis=500)
 
bool GetResponseTimeout (int &millis)
 
bool SetByteTimeout (const int &millis=500)
 
bool GetByteTimeout (int &millis)
 
bool SetIndicationTimeout (const int &millis=0)
 
bool GetIndicationTimeout (int &millis)
 
bool SetErrorRecovery (const bool recovery)
 
template<>
std::string ConvertRegister (const uint16_t *tab_reg, const uint16_t &size)
 
template<>
float ConvertRegister (const uint16_t *tab_reg, const uint16_t &size)
 

Additional Inherited Members

- Protected Member Functions inherited from SunSpec
template<typename T >
bool GetRegister (T &res, const uint16_t &reg_addr, const uint16_t &size)
 
bool SetRegister (const uint16_t &value, const uint16_t &reg_addr)
 
- Protected Attributes inherited from SunSpec
std::string ErrorMessage
 

Detailed Description

Class to manipulate Fronius specific registers.

Author
Alexander Pohl alex@.nosp@m.ahpo.nosp@m.hl.co.nosp@m.m

Member Function Documentation

bool FroniusRegister::GetActiveStateCode ( uint16_t &  code)

Get current active state code of inverter

Returns
state code
bool FroniusRegister::GetModelType ( struct ModelType_t model)

Get type of SunSpec model used for inverter and meter data.

bool FroniusRegister::GetSiteEnergyDay ( double &  res)

Total energy for current day of all connected inverters.

Returns
current day energy [kWh]
bool FroniusRegister::GetSiteEnergyTotal ( double &  res)

Total lifetime energy of all connected inverters.

Returns
lifetime energy [kWh]
bool FroniusRegister::GetSiteEnergyYear ( double &  res)

Total energy for current year of all connected inverters.

Returns
current year energy [kWh]
bool FroniusRegister::GetSitePower ( double &  res)

Total power (site sum) of all connected inverters.

Returns
power [W]
bool FroniusRegister::ResetEventFlags ( void  )

Reset all event flags and active state code

bool FroniusRegister::SetModelType ( const int &  value = 1)

Set type of SunSpec model used for inverter and meter data.

Parameters
value1: floating point (default) 2: integer + scale factor

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