rasProject_01 / weSweetHome  R. 116 2026-05-14
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
hometersConsol.c File Reference

A console program to co-operate with hometersControl. More...

#include "sweetHome.h"
#include "weUtil.h"
#include "weShareMem.h"
#include <errno.h>
#include <getopt.h>

Functions

int main (int argc, char **argv)
 The program.

Variables

char const prgNamPure []
 The pure program name.
char const prgSVNdat []
 The complete SVN date string.
char const prgSVNrev []
 The complete SVN revision string.

Detailed Description

A console program to co-operate with hometersControl.

This program gets values from hometersControl.c via shared memory and displays them on console. This is mainly for local test. The operational HMI is by (Apache 2.4) web interface via CGI and AJAX by meteRead.c.

Revision history

Client functions

This program gets values from hometersControl via shared memory synchronised by a set of semaphores: sem # 0: exclusive (short!) lock of shared memory sem # 1: signal from from hometersControl to (this) hometersConsol sem # 2: signal from from hometersControl to other (CGI etc.) programs

Library usage

The program uses the libraries (lib...): pthread, pigpiod_if2 and modbus The (weRasp/..c, include/..h) weModbus, weGPIOd and sysUtil libraries are linked in. They may be converted to and used as (.so) library, also.

cross-compile by:

program respectively transfer to target machine by:

or due to some bugs in make use winscp and IP directly by:

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

The program.

run by: hometersConsol [options
for help: hometersConsol -h

Variable Documentation

◆ prgNamPure

char const prgNamPure[]

The pure program name.

To be provided in the application's / program's source.

See also
progNam() progNamB()

◆ prgSVNrev

char const prgSVNrev[]

The complete SVN revision string.

To be provided in the application's / program's source.

See also
progRev()

◆ prgSVNdat

char const prgSVNdat[]

The complete SVN date string.

To be provided in the application's / program's source.

See also
progDat()