From 4031454d11b1f461776e78ce374329ef28cf071b Mon Sep 17 00:00:00 2001 From: Juergen Haug Date: Fri, 17 Jan 2020 11:30:34 +0100 Subject: [modellib.c] update of experimental PLogger Change-Id: I06bf29e9ae137d42ac0669816e0e73aed047785e --- .../model/etrice/api/logger.room | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/logger.room b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/logger.room index 2ba153eab..02aad87f0 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/logger.room +++ b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/logger.room @@ -25,10 +25,6 @@ RoomModel etrice.api.logger { * ---- */ ProtocolClass PLogger { - usercode3 ''' - #include - extern void PLogging_internal_logF(); - ''' conjugated PortClass { @@ -36,19 +32,25 @@ RoomModel etrice.api.logger { * Logs a simple message. Appends line separator. */ Operation log(message: char ref) ''' - logF(message, NULL); + // TODO call etLogger ''' /** * Logs a formatted message with arguments. Appends line separator. */ Operation logF(format: char ref, args: voidType varargs) ''' - va_list argptr; - va_start(argptr, format); // TODO call etLogger - PLogger_internal_logF(format, argptr); - va_end(argptr); ''' } } + + /** Simple protocol to flush logging. */ + ProtocolClass PLoggerFlush { + incoming { + Message flush() + } + outgoing { + Message done() + } + } } \ No newline at end of file -- cgit v1.2.3