// Tarcza manewrowa 2-komorowa: p1=nazwa p2,p3,p4=lokacja, p5=rotacja p6=symbol 
// Autorzy: Kudłacz, ZiomalCl

origin (p2) (p3) (p4)
rotate 0 (p5) 0
//model semafora karzełkowego:
node -1 0 (p1) model 0 0 0 0 sem/karzelki/kTMnb.t3d tabl/(p6) Lights 0 0 endmodel            //glowica
node -1 0 none model 0 0 0 0 sem/slupy/Pod_betonowa.t3d sem/slupy.bmp endmodel 


rotate 0 0 0
endorigin

node -1 0 (p1)_sem_mem memcell (p2) (p3) (p4) ShuntVelocity 0.0 0.0 none endmemcell

//zdarzenia okreslajace predkosc przy tym semaforze:
event (p1)_sem_info_stop updatevalues 0.0 (p1)_sem_mem ShuntVelocity 0.0 0 endevent
event (p1)_sem_info_man updatevalues 1.0 (p1)_sem_mem ShuntVelocity 20.0 0 endevent

event (p1)_ms1 multiple 0 none (p1)_sem_ligh1 (p1)_sem_info_stop endevent
event (p1)_sem_ligh1 lights 0.0 (p1) 1 0 endevent

event (p1)_ms2 multiple 0 none (p1)_sem_ligh2 (p1)_sem_info_man endevent
event (p1)_sem_ligh2 lights 0.0 (p1) 0 1 endevent

// uszkodzony semafor - nieoswietlony:
event (p1)_uszk multiple 0 none (p1)_sem_ligh0 (p1)_sem_info_stop endevent
event (p1)_sem_ligh0 lights 0.0 (p1) 0 0 endevent

//odczyt z pamieci:
event (p1)_sem_info getvalues 1.0 (p1)_sem_mem endevent

