rasProject_01 / weSweetHome  R. 240
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
growattHome.h File Reference

Types and values for the smart home's Growatt inverter handling (laboratory project) More...

#include "arch/config.h"
#include <stdint.h>
#include "weShareMem.h"

Data Structures

struct  modBvals_t
 Modbus readings and other process values. More...
 
struct  modSharMem_t
 Structure for shared memory. More...
 

Macros

#define ANZ_SEMAS
 Standard semaphore set size. More...
 
#define ANZmodSLAVES
 Number of Modbus attached inverters (usually 1)
 
#define GROWerror
 JSON key for several inverter errors.
 
#define SEMAPHORE_KEY
 Semaphore unique key "KÇÏfig25".
 
#define SHARED_MEM_DATA_SIZE
 Size of defined master slave communication data in shared memory. More...
 
#define SHARED_MEM_FILL_SIZE
 Size of extra fill array to have a standard shared memory size.
 
#define SHARED_MEMORY_KEY
 Shared memory key "Buffer25".
 
#define SHARED_MEMORY_SIZE
 Shared memory size 256 byte.
 

Detailed Description

Types and values for the smart home's Growatt inverter handling (laboratory project)

Copyright (c) 2019 Albrecht Weinert
weinert-automation.de a-weinert.de
/ / /\
/ /___ / \ |
\ /____\ /____\ | _|__
\ /\ / \ / \| |
\/ \/ \__/ \__/|_

Revision history

Rev. 255 29.10.2023
Rev. 213 07.07.2019 : new derived from sweetHome.h
Rev. 215 26.08.2019 : shared memory types adapted

This include file collects some configuration and naming common to
a) the Growatt inverter communication program
b) server side program(s) (CGI) for the web interfaces

All those programs, running on the system for process control and I/O, are written in C. The client side programming for the web HMI is in Javascript.

The server side programs communicate via shared memory and a set of three (ANZ_SEMAS) semaphores.

Macro Definition Documentation

◆ ANZ_SEMAS

#define ANZ_SEMAS

Standard semaphore set size.

Usually three (3..10)

◆ SHARED_MEM_DATA_SIZE

#define SHARED_MEM_DATA_SIZE

Size of defined master slave communication data in shared memory.

This macro calculates the size in bytes of the shared memory area, see valsSharMem_t. The size of the shared memory SHARED_MEMORY_SIZE should be chosen as a multiple of 256 (512) bytes. The extra bytes are usable as an array uint8_t fill[] of size SHARED_MEM_FILL_SIZE.