KAPITEL 18. LUA ANALYSER ERWEITERUNGEN
1
function o u t p u t ( )
2
l o c a l t g = t e l e g r a m s . t h i s ( )
3
i f t r a n s m i s s i o n . d a t a b i t s ( ) > 8 then
4
d i s c a r d s t h e 9 t h b i t and and uses a warning red background
5
box . t e x t { c a p t i o n ="9 B i t " , t e x t = t g : data % 256 , bg=0xFF0000 , f g =0
}
6
else
7
box . t e x t { c a p t i o n ="8 B i t " , t e x t = t g : data }
8
end
9
end
18.2.8.5
transmission.parity
Achtung! Diese Funktion liefert die in der aktuellen Aufzeichnung verwendete
Parity Einstellung NICHT das Parity-Bit eines einzelnen Bytes.
transmission.parity()
Protokollmonitor Beispiel
1
function o u t ( )
2
i f t r a n s m i s s i o n . p a r i t y ( ) ~= 2 then
3
do something when p a r i t y i s n o t even
4
box . t e x t { c a p t i o n =" Warning " , t e x t ="We need an even p a r i t y " }
5
r e t u r n
6
end
7
end
18.3 View abhängige Lua Module
Einige Module arbeiten nur in der Umgebung bestimmter
sichtstabelle ganz am Anfang sind sie kursive gelistet.
Zum Beispiel benötigen das box und telegrams Modul den Protokollmonitor
um auf die Telegramm Daten und das Telegramm Fenster zugreifen zu können.
Das gleiche gilt für das databytes Modul. Dieses erlaubt wahlfreien Zugriff
auf alle im Datenmonitor dargestellten Bytes und kann deshalb nicht außerhalb
des Datenmonitors verwendet werden.
Alle diese Module sind eng mit den jeweiligen
Sie deshalb im Detail in den jeweiligen
box Modul siehe
13.6.1
telegrams Modul siehe
data Modul siehe
236
View
13.6.7
11.7
. In der Über-
Views
verknüpft. Wir beschreiben
Views
Kapiteln.