Open Garden  0.10.1-21
Functions
queue.h File Reference

Functions to handle queues. More...

#include "ogstruct.h"
#include "debug.h"
#include "date.h"
#include "temperature.h"
#include "io_pin.h"
Include dependency graph for queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void q_push (struct programs_t *progs, struct tm *tm_clock, const uint8_t i)
 queue a program to be executed. More...
 
void queue_run (struct programs_t *progs, struct tm *tm_clock, struct debug_t *debug)
 
void queue_list (struct programs_t *progs, struct debug_t *debug)
 

Detailed Description

Functions to handle queues.

Function Documentation

◆ q_push()

void q_push ( struct programs_t progs,
struct tm tm_clock,
const uint8_t  i 
)

queue a program to be executed.

Parameters
progsthe programs struct.
tm_clockthe time.
ithe program number to be pushed into the queue.

◆ queue_list()

void queue_list ( struct programs_t progs,
struct debug_t debug 
)

list all valid programs

◆ queue_run()

void queue_run ( struct programs_t progs,
struct tm tm_clock,
struct debug_t debug 
)

Check which program in the queue to exec.

Cycle trough the queue and open/close the lines. The compiler flag OG_QUEUE_PERMIT_MULTIPLE_OLINES if present let more than one line to be open at the same time. The purge from the queue of those Q_OFF (already completed) element is done at the end of the cycle, where changing index range should not be a problem.

Parameters
progs
tm_clocktime now.
debug
Bug:
With bistable valve opening and closing oline cannot be done at the same time, any io-action must be done on separate queue-run.
Note
the printed infos rappresent the status of a queue before.
Q_DELAYED should never appear if multiple lines are permitted.
Warning
Use the exit var to stop the loop, do not change the index (i) or the print of the queue status will no longer work.