Program Listing for File EnergyMeter3Module.h
↰ Return to documentation for file (doc/include/EnergyMeter3Module.h
)
#ifndef ENERGYMETER3_MODULE_H_
#define ENERGYMETER3_MODULE_H_
#include "EmodCommon.hpp"
#include "EmodRet.hpp"
#include "EnergyMeterParameters.hpp"
#ifdef __cplusplus
extern "C" {
#endif
struct EnergyMeter3ModuleStruct;
typedef struct EnergyMeter3ModuleStruct EnergyMeter3Module_t;
typedef void (*EnergyMeter3ModuleCallback_Type)(const uint8_t* data, uint16_t datalen, uint8_t idFunction, void* ctx);
typedef void (*EnergyMeter3ModuleCookedCallback_Type)(const void* cooked_data, const uint16_t datalen, const uint8_t idFunction, void* ctx);
EnergyMeter3Module_t* EnergyMeter3Module_create();
void EnergyMeter3Module_destroy(EnergyMeter3Module_t* module);
EmodRet EnergyMeter3Module_init(EnergyMeter3Module_t* module, const ModuleType em3_type, const EnergyMeter3ModuleCallback_Type callback, void* context);
EmodRet EnergyMeter3Module_init_v(EnergyMeter3Module_t* module, const ModuleType em3_type, const EnergyMeter3ModuleCallback_Type callback, void* context,
uint8_t variant);
EmodRet EnergyMeter3Module_configCurrentFullScale(EnergyMeter3Module_t* module, const float full_current_L1, const float full_current_L2,
const float full_current_L3);
EmodRet EnergyMeter3Module_configVoltageFullScale(EnergyMeter3Module_t* module, const float full_voltage_L1, const float full_voltage_L2,
const float full_voltage_L3);
EmodRet EnergyMeter3Module_configSecondaryVoltageFullScale(EnergyMeter3Module_t* module, const float full_voltage_L1, const float full_voltage_L2,
const float full_voltage_L3);
EmodRet EnergyMeter3Module_configCurrentDirection(EnergyMeter3Module_t* module, const uint8_t current_direction_L1, const uint8_t current_direction_L2,
const uint8_t current_direction_L3);
EmodRet EnergyMeter3Module_configWorkMode(EnergyMeter3Module_t* module, const uint16_t mode);
EmodRet EnergyMeter3Module_configMeteringStandard(EnergyMeter3Module_t* module, const uint16_t standard);
EmodRet EnergyMeter3Module_resetAllEnergyMeter(EnergyMeter3Module_t* module);
EmodRet EnergyMeter3Module_getCurrentFullScale(EnergyMeter3Module_t* module, float* full_current_L1, float* full_current_L2, float* full_current_L3);
EmodRet EnergyMeter3Module_getVoltageFullScale(EnergyMeter3Module_t* module, float* full_voltage_L1, float* full_voltage_L2, float* full_voltage_L3);
EmodRet EnergyMeter3Module_getSecondaryVoltageFullScale(EnergyMeter3Module_t* module, float* full_voltage_L1, float* full_voltage_L2, float* full_voltage_L3);
EmodRet EnergyMeter3Module_getCurrentDirection(EnergyMeter3Module_t* module, uint8_t* current_direction_L1, uint8_t* current_direction_L2,
uint8_t* current_direction_L3);
EmodRet EnergyMeter3Module_getWorkMode(EnergyMeter3Module_t* module, uint16_t* mode);
EmodRet EnergyMeter3Module_getMeteringStandard(EnergyMeter3Module_t* module, uint16_t* standard);
EmodRet EnergyMeter3Module_getPowerParameters(EnergyMeter3Module_t* module, const int32_t phase, PhasePowerParameters* parameters);
EmodRet EnergyMeter3Module_getEnergyParameters(EnergyMeter3Module_t* module, const int32_t phase, EnergyParameters* parameters);
EmodRet EnergyMeter3Module_getPowerParameters_L123Combined(EnergyMeter3Module_t* module, CombinedPowerParameters* parameters);
EmodRet EnergyMeter3Module_getEnergyParameters_L123Combined(EnergyMeter3Module_t* module, EnergyParameters* parameters);
// Callback methods
EmodRet EnergyMeter3Module_configEventAtTimeInterval(EnergyMeter3Module_t* module, const uint32_t time_interval);
EmodRet EnergyMeter3Module_resetEventConfig(EnergyMeter3Module_t* module);
#ifdef __cplusplus
};
#endif
#endif // ENERGYMETER3_MODULE_H_