instancevariables -- using the VDMTools standard IO library to create a trace file static io : IO := new IO(); static mode : <start> | <append> := <start>
operations -- printNetworkEvent writes a time trace to the file mytrace.txt -- this file can be used for application specific post analysis public printNetworkEvent: seqofchar * seqofchar * nat ==> ()
printNetworkEvent (psrc, pdest, pid) == def - = io.fwriteval[seqof (seqofchar | nat)]
("mytrace.txt", ["network", psrc, pdest, pid, time], mode) in mode := <append>;
-- printInterruptEvent writes a time trace to the file mytrace.txt -- this file can be used for application specific post analysis public printInterruptEvent: seqofchar * seqofchar * nat ==> ()
printInterruptEvent (psrc, pdest, pid) == def - = io.fwriteval[seqof (seqofchar | nat)]
("mytrace.txt", ["interrupt", psrc, pdest, pid, time], mode) in mode := <append>;
end Logger
\end{vdm_al}
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.