12.07.2015 Views

Testing Embedded Systems in the Automotive Industry with TTCN-3

Testing Embedded Systems in the Automotive Industry with TTCN-3

Testing Embedded Systems in the Automotive Industry with TTCN-3

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Real Time <strong>TTCN</strong>-3Simple Real Time Scenariowww.temea.orgtimer t1,t2;p_out.send(OUT_MSG_1);test componentsystem under testt1.start(t_max);stimulus - OUT_MSG_1(SUT)alt{time check[t MAX ][]p_<strong>in</strong>.receive(IN_MSG_1){setverdict(pass)};[]t1.timeout{setverdict(fail)}value check reaction - IN_MSG_1}time control [t WAIT ]t2.start(twait);t2.timeout;stimulus - OUT_MSG_2p_out.send(OUT_MSG_2);p_<strong>in</strong>.receive(IN_MSG_2);setverdict(pass); var reaction float - IN_MSG_2 r_time,s_time;p_out.send(OUT_MSG_1);s_time:=now;p_<strong>in</strong>.receive(IN_MSG_1)-> timestamp r_time;if(r_time>s_time+tmax) setverdict(fail);wait(r_time+twait);p_out.send(OUT_MSG_2);p_<strong>in</strong>.receive(IN_MSG_2);setverdict(pass);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!