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

A program to handle some day specific settings and values. More...

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

Functions

int main (int argc, char **argv)
 The program. More...
 
int readRetFil (void)
 Read (day start) retain file. More...
 
int writeRetFil (void)
 Write (day start) retain file. More...
 

Variables

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

Detailed Description

A program to handle some day specific settings and values.

At the present (simple start) stage this program just displays the current day's start / hibernation value file content.

More feature controlled by start parameters will be added in future.

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

Revision history

Rev. 247 5.05.2023
Rev. 151 20.06.2018 : new; just see current day values file (to start with)
Rev. 199 07.03.2019 : -t parameter, help text enhanced
Rev. 245 01.05.2023 : valFilNam removed (by //) option t corrected

cross-compile by:

arm-linux-gnueabihf-gcc -DF_CPU=1200000000 -DPLATFORM=raspberry_03
-DMCU=BCM2837 -DTARGET=raspi61 -I./include
-c -o hometersControl.o hometersDayVal.c
arm-linux-gnueabihf-gcc -DF_CPU=1200000000 -DPLATFORM=raspberry_03
-DMCU=BCM2837 -DTARGET=raspi61 -I./include
-c -o weRasp/weUtil.o weRasp/weUtil.c
and so on .... \code
arm-linux-gnueabihf-gcc -I. -DPLATFORM=raspberry_03 -DMCU=BCM2837
-DTARGET=raspi61 -I./include hometersControl.o
weRasp/weUtil.o weRasp/weModbus.o weRasp/weGPIOd.o
weRasp/weShareMem.o --output hometersControl.elf
-Wl,-Map=hometersControl.map,--cref
-lrt -pthread -lmodbus -lpigpiod_if2

or by:

make PROGRAM=hometersDayVal TARGET=raspi61 clean all

program by:

make PROGRAM=hometersDayVal TARGET=meterPi FTPuser=pi:piSecret progapp

Function Documentation

◆ readRetFil()

int readRetFil ( void  )

Read (day start) retain file.

Returns
0 : file found and read; else not

◆ writeRetFil()

int writeRetFil ( void  )

Write (day start) retain file.

Returns
0 : file opened/created and written; else not

◆ main()

int main ( int  argc,
char **  argv 
)

The program.

run by: hometersControl [options options so far (14.11.17): any parameter = use stdout and stderr

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()