no-OS
Functions
self_test.c File Reference

Relay implementation file. More...

#include "no_os_print_log.h"
#include "common_data.h"
#include "no_os_delay.h"
#include "parameters.h"
#include "no_os_util.h"
#include "self_test.h"
#include "interface.h"
#include "supply.h"
#include "pilot.h"
#include "relay.h"
Include dependency graph for self_test.c:

Functions

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

Detailed Description

Relay implementation 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.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ self_test_rcd()

int self_test_rcd ( struct stout stout)

Startup test for RCD.

Parameters
stout- state machine descriptor
Returns
0 in case of success, error code otherwise
Here is the caller graph for this function:

◆ 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.

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
Here is the caller graph for this function:

◆ self_test_relay_closed()

int self_test_relay_closed ( struct stout stout,
int32_t  v2 
)

Running test for relay.

Parameters
stout- state machine descriptor
v2- value
Returns
0 in case of success, error code otherwise
Here is the caller graph for this function:

◆ self_test_relay_stuck()

int self_test_relay_stuck ( struct stout stout)

Relay test.

Parameters
stout- state machine descriptor
Returns
0 in case of success, error code otherwise
Here is the caller graph for this function:

◆ self_test_startup()

int self_test_startup ( struct stout stout,
struct rms_adc_values rms_adc_values 
)

Startup test.

Parameters
stout- state machine descriptor
rms_adc_values- structure holding the measurements values
Returns
0 in case of success, error code otherwise
Here is the caller graph for this function:

◆ self_test_supply()

int self_test_supply ( struct stout stout,
struct rms_adc_values rms_adc_values 
)

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
Here is the caller graph for this function: