26 lines
654 B
C++
26 lines
654 B
C++
/*
|
||
* SignalWatchDogSetup.cpp
|
||
*
|
||
* Created on: 12 окт. 2019 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#include "../../schematic/ValueWatchDog.hpp"
|
||
#include "SignalWatchDogSetup.hh"
|
||
|
||
bool application::schematic::SignalWatchDogSetup::input( Environment & env ) {
|
||
|
||
return signal = env.signals.get( links.in_signal_id );
|
||
|
||
}
|
||
|
||
void application::schematic::SignalWatchDogSetup::build( Environment & env ) {
|
||
|
||
typedef ::schematic::ValueWatchDogObser2Obser<float> SignalWatchDog;
|
||
|
||
SignalWatchDog * wd = memories::instance_object<SignalWatchDog>( env.static_setup_ma, *signal, setting.timeout_in_second );
|
||
|
||
env.statuses.add( links.out_status_id, wd );
|
||
|
||
}
|