1-phase PV router
Loading...
Searching...
No Matches
test_main.cpp File Reference

Tests for the relay output feature. More...

#include <Arduino.h>
#include <U8g2lib.h>
#include <unity.h>
#include "utils_pins.h"
#include "utils_relay.h"
Include dependency graph for test_main.cpp:

Go to the source code of this file.

Functions

void loop ()
 
void setUp (void)
 
void setup ()
 
void tearDown (void)
 
void test_get_importThreshold (void)
 
void test_get_minOFF (void)
 
void test_get_minON (void)
 
void test_get_pin (void)
 
void test_get_size (void)
 
void test_get_surplusThreshold (void)
 
void test_isRelayON (void)
 
void test_proceed_relay (void)
 
void test_relay_initialization (void)
 
void test_relay_initialization_with_negative_thresholds (void)
 
void test_relay_initialization_with_positive_thresholds (void)
 
void test_relay_turnOFF (void)
 
void test_relay_turnON (void)
 

Variables

constexpr RelayEngine relays
 

Detailed Description

Tests for the relay output feature.

Author
Frederic Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
Version
0.1
Date
2024-11-15

Definition in file test_main.cpp.

Function Documentation

◆ loop()

◆ setUp()

void setUp ( void )
Test
Set up function for the tests

Definition at line 26 of file test_main.cpp.

References relays.

◆ setup()

void setup ( )

Definition at line 201 of file test_main.cpp.

◆ tearDown()

void tearDown ( void )
Test
Tear down function for the tests

Definition at line 34 of file test_main.cpp.

◆ test_get_importThreshold()

void test_get_importThreshold ( void )
Test
Test getting the import threshold of the relay

Definition at line 93 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_get_minOFF()

void test_get_minOFF ( void )
Test
Test getting the minimum OFF time of the relay

Definition at line 111 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_get_minON()

void test_get_minON ( void )
Test
Test getting the minimum ON time of the relay

Definition at line 102 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_get_pin()

void test_get_pin ( void )
Test
Test getting the pin of the relay

Definition at line 75 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_get_size()

void test_get_size ( void )
Test
Test getting the size of the relay engine

Definition at line 196 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_get_surplusThreshold()

void test_get_surplusThreshold ( void )
Test
Test getting the surplus threshold of the relay

Definition at line 84 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_isRelayON()

void test_isRelayON ( void )
Test
Test if the relay is initially OFF

Definition at line 120 of file test_main.cpp.

References relays.

Referenced by loop().

Here is the caller graph for this function:

◆ test_proceed_relay()

void test_proceed_relay ( void )
Test
Test the proceed_relay function for turning the relay ON and OFF

Definition at line 186 of file test_main.cpp.

References test_relay_turnOFF(), and test_relay_turnON().

Referenced by loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_relay_initialization()

void test_relay_initialization ( void )
Test
Test relay initialization with specific pin and thresholds

Definition at line 42 of file test_main.cpp.

References relayOutput::get_importThreshold(), relayOutput::get_pin(), and relayOutput::get_surplusThreshold().

Referenced by loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_relay_initialization_with_negative_thresholds()

void test_relay_initialization_with_negative_thresholds ( void )
Test
Test relay initialization with negative thresholds

Definition at line 64 of file test_main.cpp.

References relayOutput::get_importThreshold(), relayOutput::get_pin(), and relayOutput::get_surplusThreshold().

Referenced by loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_relay_initialization_with_positive_thresholds()

void test_relay_initialization_with_positive_thresholds ( void )
Test
Test relay initialization with positive thresholds

Definition at line 53 of file test_main.cpp.

References relayOutput::get_importThreshold(), relayOutput::get_pin(), and relayOutput::get_surplusThreshold().

Referenced by loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_relay_turnOFF()

void test_relay_turnOFF ( void )
Test
Test turning the relay OFF

Definition at line 157 of file test_main.cpp.

References relays.

Referenced by test_proceed_relay().

Here is the caller graph for this function:

◆ test_relay_turnON()

void test_relay_turnON ( void )
Test
Test turning the relay ON

Definition at line 128 of file test_main.cpp.

References relays.

Referenced by test_proceed_relay().

Here is the caller graph for this function:

Variable Documentation

◆ relays

RelayEngine relays
constexpr
Initial value:
{ { { 2, 1000, 200, 1, 1 },
{ 3, 100, 20, 2, 3 } } }

Definition at line 20 of file test_main.cpp.