no-OS
Loading...
Searching...
No Matches
self_test.h File Reference

Self-tests interface file. More...

#include "state_machine.h"
Include dependency graph for self_test.h:

Functions

int self_test_startup (struct stout *stout, struct rms_adc_values *rms_adc_values)
 Startup test.
 
int self_test_relay_stuck (struct stout *stout)
 Relay test.
 
int self_test_rcd (struct stout *stout)
 Startup test for RCD.
 
int self_test_rcd_running (struct stout *stout, uint16_t step, enum state_machine_events_e *event)
 Running test for RCD.
 
int self_test_supply (struct stout *stout, struct rms_adc_values *rms_adc_values)
 Startup test for power supply.
 
int self_test_relay_closed (struct stout *stout, int32_t v2)
 Running test for relay.
 
int self_test_pe_upstream (struct stout *stout)
 

Detailed Description

Self-tests interface file.

Author
GMois (georg.nosp@m.e.mo.nosp@m.is@an.nosp@m.alog.nosp@m..com), REtz (radu..nosp@m.etz@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright (c) 2023 Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ self_test_pe_upstream()

int self_test_pe_upstream ( struct stout * stout)

Startup test for upstream PE detection

◆ self_test_rcd()

int self_test_rcd ( struct stout * stout)

Startup test for RCD.

Startup test for RCD

Parameters
stout- state machine descriptor
Returns
0 in case of success, error code otherwise

◆ self_test_rcd_running()

int self_test_rcd_running ( struct stout * stout,
uint16_t step,
enum state_machine_events_e * event )

Running test for RCD.

Running test for RCD

Parameters
stout- state machine descriptor
step- zero crossing count (used for counting 20ms periods for time tracking)
event- test trigger and test complete indicator
Returns
0 in case of success, error code otherwise

◆ self_test_relay_closed()

int self_test_relay_closed ( struct stout * stout,
int32_t v2 )

Running test for relay.

Running test for relay

Parameters
stout- state machine descriptor
v2- value
Returns
0 in case of success, error code otherwise

◆ self_test_relay_stuck()

int self_test_relay_stuck ( struct stout * stout)

Relay test.

Relay test

Parameters
stout- state machine descriptor
Returns
0 in case of success, error code otherwise

◆ self_test_startup()

int self_test_startup ( struct stout * stout,
struct rms_adc_values * rms_adc_values )

Startup test.

Startup test

Parameters
stout- state machine descriptor
rms_adc_values- structure holding the measurements values
Returns
0 in case of success, error code otherwise

◆ self_test_supply()

int self_test_supply ( struct stout * stout,
struct rms_adc_values * rms_adc_values )

Startup test for power supply.

Startup test for power supply

Parameters
stout- state machine descriptor
rms_adc_values- structure holding the measurements values
Returns
0 in case of success, error code otherwise