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

Class to get data from a SunSpec compatible Fronius inverter. More...

#include <FroniusInverter.h>

Inheritance diagram for FroniusInverter:
CommonModel InverterModel NameplateModel ExtendedModel ImmediateModel MultiMpptModel FroniusRegister SunSpec SunSpec SunSpec SunSpec SunSpec StateEvents SunSpec SunSpec

Data Structures

struct  StateCode_t
 

Public Member Functions

bool IsSunSpecInverter (void)
 
bool GetStateCode (StateCode_t &state)
 
- Public Member Functions inherited from CommonModel
bool IsCommonRegisterMap (void)
 
bool GetManufacturer (std::string &str)
 
bool GetDeviceModel (std::string &str)
 
bool GetOptionFwVersion (std::string &str)
 
bool GetDeviceFwVersion (std::string &str)
 
bool GetSerialNumber (std::string &str)
 
- 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)
 
- Public Member Functions inherited from InverterModel
bool IsInverterRegisterMap (void)
 
bool GetAcCurrent (double &res)
 
bool GetAcCurrentPhase (double &res, const char &ph= 'A')
 
bool GetAcVoltage (double &res, const char &ph= 'A')
 
bool GetAcVoltagePhaseToPhase (double &res, const std::string &ph_pair)
 
bool GetAcPower (double &res)
 
bool GetAcFrequency (double &res)
 
bool GetAcPowerApparent (double &res)
 
bool GetAcPowerReactive (double &res)
 
bool GetAcPowerFactor (double &res)
 
bool GetAcEnergyLifetime (double &res)
 
bool GetStateEvtFlags (StateEvt_t &state_evt)
 
- Public Member Functions inherited from NameplateModel
bool IsNameplateRegisterMap (void)
 
bool GetPowerOutputMax (double &res)
 
bool GetPowerApparentMax (double &res)
 
bool GetPowerReactiveMax (double &res, const int quadrant)
 
bool GetAcCurrentMax (double &res)
 
bool GetPowerFactorMin (double &res, const int quadrant)
 
- Public Member Functions inherited from ExtendedModel
bool IsExtendedRegisterMap (void)
 
bool GetTimestamp (long int &ts)
 
- Public Member Functions inherited from ImmediateModel
bool IsImmediateRegisterMap (void)
 
bool GetAcConnection (bool &state)
 
bool SetAcConnection (const bool &state)
 
- Public Member Functions inherited from MultiMpptModel
bool IsMultiMpptRegisterMap (void)
 
bool GetDcCurrent (double &res, const int string_id=1)
 
bool GetDcVoltage (double &res, const int string_id=1)
 
bool GetDcPower (double &res, const int string_id=1)
 
bool GetDcEnergyLifetime (double &res, const int string_id=1)
 
- Public Member Functions inherited from FroniusRegister
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)
 

Private Member Functions

bool SetStateCodeStr (StateCode_t &state)
 

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 Member Functions inherited from StateEvents
bool SetStateEventsStr (StateEvt_t &state_evt)
 
- Protected Attributes inherited from SunSpec
std::string ErrorMessage
 
- Protected Attributes inherited from StateEvents
std::string ErrorStr
 

Detailed Description

Member Function Documentation

bool FroniusInverter::GetStateCode ( StateCode_t state)

Get Fronius state code

bool FroniusInverter::IsSunSpecInverter ( void  )

Checks if device is a SunSpec compatible inverter

bool FroniusInverter::SetStateCodeStr ( StateCode_t state)
private

Set Fronius state code string


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