Libraries/IOControl/include/IO/Modbus/RID35/Device.h File Reference
#include "../Device.h"
Include dependency graph for Libraries/IOControl/include/IO/Modbus/RID35/Device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IO::Modbus::RID35::Device
 
class  IO::Modbus::RID35::Device::Factory
 

Namespaces

 IO
 
 IO::Modbus
 
 IO::Modbus::RID35
 

Macros

#define RID35_STDREG_MAP(XX)
 
#define RID35_OVFREG_MAP(XX)
 
#define XX(reg, tag, ...)   tag,
 

Enumerations

enum  IO::Modbus::RID35::Unit {
  IO::Modbus::RID35::Unit::NONE, IO::Modbus::RID35::Unit::KW, IO::Modbus::RID35::Unit::KVAR, IO::Modbus::RID35::Unit::KVA,
  IO::Modbus::RID35::Unit::KWH, IO::Modbus::RID35::Unit::KVARH, IO::Modbus::RID35::Unit::KVAH, IO::Modbus::RID35::Unit::VOLT,
  IO::Modbus::RID35::Unit::AMP, IO::Modbus::RID35::Unit::HERTZ
}
 
enum  IO::Modbus::RID35::Register { IO::Modbus::RID35::Register::XX, IO::Modbus::RID35::Register::RID35_STDREG_MAP }
 

Functions

String toString (IO::Modbus::RID35::Register reg)
 

Variables

constexpr uint16_t IO::Modbus::RID35::stdRegBase = 0x01
 
constexpr uint16_t IO::Modbus::RID35::ovfRegBase = 0x96
 
constexpr size_t IO::Modbus::RID35::stdRegCount = (1 + unsigned(Register::MaxDemandApparentPower)) * 2
 
constexpr size_t IO::Modbus::RID35::ovfRegCount = 1 + unsigned(Register::Kvah) - unsigned(Register::TotalKwh)
 
constexpr size_t IO::Modbus::RID35::registerCount = stdRegCount + ovfRegCount
 

Macro Definition Documentation

◆ RID35_OVFREG_MAP

#define RID35_OVFREG_MAP (   XX)
Value:
XX(150, TotalKwh, KWH) \
XX(151, ImportKwh, KWH) \
XX(152, ExportKwh, KWH) \
XX(153, TotalKvarh, KVARH) \
XX(154, ImportKvarh, KVARH) \
XX(155, ExportKvarh, KVARH) \
XX(156, Kvah, KVAH)

◆ RID35_STDREG_MAP

#define RID35_STDREG_MAP (   XX)
Value:
XX(1, TotalActiveEnergy, KWH) \
XX(3, ImportActiveEnergy, KWH) \
XX(5, ExportActiveEnergy, KWH) \
XX(7, TotalReactiveEnergy, KVARH) \
XX(9, ImportReactiveEnergy, KVARH) \
XX(11, ExportReactiveEnergy, KVARH) \
XX(13, ApparentEnergy, KVAH) \
XX(15, ActivePower, KW) \
XX(17, ReactivePower, KVAR) \
XX(19, ApparentPower, KVA) \
XX(21, Voltage, VOLT) \
XX(23, Current, AMP) \
XX(25, PowerFactor, NONE) \
XX(27, Frequency, HERTZ) \
XX(29, MaxDemandActivePower, KW) \
XX(31, MaxDemandReactivePower, KVAR) \
XX(33, MaxDemandApparentPower, KVA)

Modbus/RID35/Device.h

Created on: 24 March 2022

Copyright 2022 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the IOControl Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

Rayleigh Instruments RI-D35 energy meter

Device registers are read-only. The Node ID corresponds to the register address.

◆ XX

#define XX (   reg,
  tag,
  ... 
)    tag,

Function Documentation

◆ toString()

#define XX(reg, tag,...)
Definition: Libraries/IOControl/include/IO/Modbus/RID35/Device.h:78