summaryrefslogtreecommitdiffstats
path: root/Master/Embedded Frameworks
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Embedded Frameworks
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Embedded Frameworks')
-rw-r--r--Master/Embedded Frameworks/Bytestream.zipbin0 -> 7135 bytes
-rw-r--r--Master/Embedded Frameworks/CGlobal.h48
-rw-r--r--Master/Embedded Frameworks/CMOSTConst.h215
-rw-r--r--Master/Embedded Frameworks/EF_Prakt2.patch614
-rw-r--r--Master/Embedded Frameworks/Embedded_Frameworks_GL_Rahmenpaket.zipbin0 -> 16134544 bytes
-rw-r--r--Master/Embedded Frameworks/Embedded_Frameworks_Vorlesung_Kurzskript.pdfbin0 -> 128365 bytes
-rw-r--r--Master/Embedded Frameworks/Ergänzungen_zum_Buch.pdfbin0 -> 146927 bytes
-rw-r--r--Master/Embedded Frameworks/Framework_EmbFrameworks_SS10_20100401.tar.gzbin0 -> 112107 bytes
-rw-r--r--Master/Embedded Frameworks/Framework_embFrameworks_SS10_200100422.tar.gzbin0 -> 3901657 bytes
-rw-r--r--Master/Embedded Frameworks/MOST_Beispiele.pdfbin0 -> 31648 bytes
-rw-r--r--Master/Embedded Frameworks/MiniComDriver_KKlein.zipbin0 -> 532174 bytes
-rw-r--r--Master/Embedded Frameworks/Philo0_QNX.zipbin0 -> 241078 bytes
-rw-r--r--Master/Embedded Frameworks/Prak2.patch506
-rw-r--r--Master/Embedded Frameworks/Prakt5/watchdog.tar.bz2bin0 -> 2094 bytes
-rw-r--r--Master/Embedded Frameworks/Prakt5/watchdog/Makefile21
-rw-r--r--Master/Embedded Frameworks/Prakt5/watchdog/hwwatchdog.cpp140
-rw-r--r--Master/Embedded Frameworks/Prakt5/wd-framework.tar.bz2bin0 -> 2801775 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_1_10.pdfbin0 -> 4766 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_2_10.pdfbin0 -> 4611 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_3_10.pdfbin0 -> 4839 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_4_10.pdfbin0 -> 3468 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_5_10.pdfbin0 -> 4634 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6a_10.pdfbin0 -> 4675 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6b_10.pdfbin0 -> 3966 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Philo0_QNX.zipbin0 -> 247304 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen/Target-Debugging.pdfbin0 -> 304835 bytes
-rw-r--r--Master/Embedded Frameworks/Uebungen_EmbFrameworks_SS10_20100401.tar.gzbin0 -> 1649196 bytes
-rw-r--r--Master/Embedded Frameworks/managed_Framework_2_stripped.zipbin0 -> 4180896 bytes
-rw-r--r--Master/Embedded Frameworks/minimost.tarbin0 -> 102400 bytes
-rw-r--r--Master/Embedded Frameworks/p3b.tar.gzbin0 -> 3913298 bytes
-rw-r--r--Master/Embedded Frameworks/prakt1.diff78
31 files changed, 1622 insertions, 0 deletions
diff --git a/Master/Embedded Frameworks/Bytestream.zip b/Master/Embedded Frameworks/Bytestream.zip
new file mode 100644
index 0000000..2a11154
--- /dev/null
+++ b/Master/Embedded Frameworks/Bytestream.zip
Binary files differ
diff --git a/Master/Embedded Frameworks/CGlobal.h b/Master/Embedded Frameworks/CGlobal.h
new file mode 100644
index 0000000..eaa6d18
--- /dev/null
+++ b/Master/Embedded Frameworks/CGlobal.h
@@ -0,0 +1,48 @@
+#ifndef CGLOBAL_H
+#define CGLOBAL_H
+
+/***********************************************************************
+ * Project : Framework
+ *
+ * File : CGlobal.h
+ * Author : JW
+ * Date : 04.05.2006
+ ***********************************************************************/
+
+/**
+ *
+ * This file contains the common elementar data types used in the
+ * project. Using Int8, Int16 etc. help easiliy porting the codes.
+ * This file does not contain any specific hardware pins or ports
+ */
+
+// comment the line below to avoid including MOST-headers.
+// this could be used to compile the system library without MOST.
+#define USE_MOSTDRIVER
+
+// synonyme for elementar data types
+typedef signed char Int8;
+typedef unsigned char UInt8;
+typedef signed short Int16;
+typedef unsigned short UInt16;
+typedef signed int Int32;
+typedef unsigned int UInt32;
+
+
+// Definition für nullpointer und null character
+#define NULLPTR 0
+#define NULLCHAR 0
+
+// Macro used to round up the memory required due to the alignment
+#define MAKE_ALIGNMENT_SIZE(size) ((( (size) + (sizeof(Int32) - 1) ) \
+ / sizeof(Int32))*sizeof(Int32))
+
+// the follwing macros work for Little and Big-Endian
+#define MAKE_INT16(a,b) Int16( ((UInt16) a << 8) | UInt8(b) )
+#define MAKE_UINT16(a,b) UInt16( ((UInt16) a << 8) | UInt8(b) )
+
+#define LOW_BYTE(w) UInt8(w&0xFF)
+#define HIGH_BYTE(w) UInt8(w >> 8)
+
+
+#endif // CGLOBAL_H
diff --git a/Master/Embedded Frameworks/CMOSTConst.h b/Master/Embedded Frameworks/CMOSTConst.h
new file mode 100644
index 0000000..6a60097
--- /dev/null
+++ b/Master/Embedded Frameworks/CMOSTConst.h
@@ -0,0 +1,215 @@
+#ifndef CMOSTCONST_H
+#define CMOSTCONST_H
+//*****************************************************************************
+//
+// Project : FON
+//
+
+//
+// File : CMOSTConst.h
+//
+// Description : Defines constants depending on MOST which are used in
+// the projects
+//
+// Author : JW
+//*****************************************************************************
+
+#ifndef CGLOBAL_H
+#include "CGlobal.h"
+#endif
+
+namespace CMOST
+{
+ enum MOSTUnit
+ {
+ NONE,
+ MILLISEC,
+ YEAR,
+ MONTH,
+ HOUR,
+ MINUTE,
+ SECOND
+ };
+ // elementar types used in the MOST communication
+ enum ElementarTypeEnum
+ {
+ BOOLEAN,
+ ENUM,
+ INT8,
+ INT16,
+ INT32,
+ UINT8,
+ UINT16,
+ UINT32,
+ STRING,
+ STREAM
+ };
+
+ enum StringType
+ {
+ UNICODE,
+ ASCII,
+ UTF8
+ };
+
+ enum ModelTypeEnum
+ {
+ SINGLE_PROP,
+ RECORD_PROP,
+ ARRAY_PROP,
+ ARRAY_RECORD_PROP
+ };
+
+ // max properties in a MOST message
+ enum {MAX_PROPERTIES_IN_A_FUNC = 5};
+
+ // Different MOST-Operation types defined in the spec
+ enum OpTypeEnum
+ {
+ OP_SET = 0x00,
+ OP_START = 0x00,
+ OP_GET = 0x01,
+ OP_ABORT = 0x01,
+ OP_SETGET = 0x02,
+ OP_STARTRES = 0x02,
+ OP_INC = 0x03,
+ OP_DEC = 0x04,
+ OP_GETIF = 0x05,
+ OP_STARTRESACK = 0x06,
+ OP_ABORTACK = 0x07,
+ OP_STARTACK = 0x08,
+ OP_ERRACK = 0x09,
+ OP_PROCACK = 0x0A,
+ OP_PROC = 0x0B,
+ OP_STAT = 0x0C,
+ OP_RES = 0x0C,
+ OP_RESACK = 0x0D,
+ OP_IF = 0x0E,
+ OP_ERR = 0x0F,
+
+ //start of MMI internal OpTypes
+ OP_INTERN_DATA = 0x10, //used with LongArray
+ OP_INTERN_ERROR = 0x11, //used with LongArray
+
+ OP_UNDEFINED = 0xFF
+ };
+
+ enum OpInTypeMask
+ {
+ OP_STATUS_MASK = 0x1000,
+ OP_ERROR_MASK = 0x8000,
+ };
+
+ enum OpOutTypeMask
+ {
+ OP_SET_MASK = 0x0001,
+ OP_GET_MASK = 0x0002,
+ OP_SETGET_MASK = 0x0004,
+ OP_INCREMENT_MASK = 0x0008,
+ OP_DECREMENT_MASk = 0x0010,
+ OP_GETINTERFACE_MASK = 0x0020
+ };
+
+ enum ERROR_ENUM
+ {
+ PROC_OK = 0x00,
+ ERR_FBLKID_NOT_AVAILABLE = 0x01,
+ ERR_INSTID_NOT_AVAILABLE = 0x02,
+ ERR_FUNCID_NOT_AVAILABLE = 0x03,
+ ERR_OPTYPE_NOT_AVAILABLE = 0x04,
+ ERR_INVALID_LENGTH = 0x05,
+ ERR_PARAMETER_WRONG = 0x06,
+ ERR_PARAMETER_NOT_AVAILABLE = 0x07,
+ ERR_PARAMETER_MISSING = 0x08,
+ ERR_TOO_MANY_PARAMETERS = 0x09,
+ ERR_SECONDARY_NODE = 0x0A,
+ ERR_FUNCTION_SPECIFIC = 0x20,
+ ERR_BUSY = 0x40,
+ ERR_NOT_AVAILABLE = 0x41,
+ ERR_PROCESSING = 0x42,
+
+ ERR_MOST_MESSAGE_NAK = 0xBB, //a MOST Message was not acknowledged from receiver
+ //this should be defined > 0xFF to get out of the
+ //specified range of MOST but before this we have
+ //change ICAANotify* generation.
+ ERR_INTERNAL_ERROR = 0x101,
+ ERR_UNRECOVERED_INTERNAL_ERROR = 0x102, //!!! - will trigger a reset - !!!
+ ERR_UNDEFINED = 0xFFFF
+ };
+
+ // Function Block ID's
+ // The range from 0x00 to 0xBF is reserved for FBlockID's defined by the MOST Consortium
+ // All ID's in this range must be uniquely defined and must match definitions in the
+ // MOST Function Catalog.
+ enum FBLOCK_ID_ENUM
+ {
+ NET_BLOCK = 0x01,
+ NETWORK_MASTER = 0x02,
+ CONNECTION_MASTER = 0x03,
+ POWER_MASTER = 0x04,
+ VEHICLE = 0x05,
+ DIAGNOSIS = 0x06,
+ ROUTER = 0x08,
+ CAR_DEVICE = 0x08, // ILLEGAL: proprietary
+
+ MMI = 0x10, // ILLEGAL: but used by some projects
+ SPEECH_RECOGNITION = 0x11,
+ PROMPT_PLAYER = 0x12,
+ LIST_MATCHING = 0x13,
+
+ AUDIO_AMPLIFIER = 0x22,
+ HEAD_PHONE_AMPLIFIER = 0x23,
+ AUXILIARY_INPUT = 0x24,
+ MICROPHONE_INPUT = 0x26,
+ HANDS_FREE = 0x28,
+
+ AUDIO_TAPE_PLAYER = 0x30,
+ AUDIO_DISC_PLAYER = 0x31,
+ VERSATILE_DISC_PLAYER = 0x34, // still prelim
+
+ AM_FM_TUNER = 0x40,
+ TMC_TUNER = 0x41,
+ TV_TUNER = 0x42,
+
+ TELEPHONE = 0x50,
+ PHONE_BOOK = 0x51,
+ NAVIGATION_SYSTEM = 0x52,
+ TMC_DECODER = 0x53,
+ BLUETOOTH = 0x54,
+ CLIMATE = 0xC0,
+ BC_STATISTIC = 0xC1,
+ BC_TRAVEL_INFO = 0xC2,
+ MCNET_MMI = 0xC3,
+ MCNET_GATEWAY = 0xC4,
+ SIMCARD_READER = 0xC5,
+
+ AUDIO_MASTER = 0xD3,
+
+ // Function Block ID's
+ // The range from 0xC0 to 0xEF is reserved for FBlockID's within a project
+ // These declarations may overlap with declarations from other projects
+ // project specific declarations
+ RESOURCE_MASTER = 0xC0,
+ COMMUNICATION_MANAGER = 0xC7,
+ CPAPPSERVICE = 0xC9,
+
+ // Function Block ID's
+ // The range from 0xC0 to 0xEF is reserved for FBlockID's within a project
+ // These declarations may overlap with declarations from other projects
+ // project specific declarations
+ TMC_SERVICE = 0xC5,
+
+ // Function Block ID for
+ // CAN-T/MOST Gateway for Rear-Seat entertainment in
+ // a project
+ RSE = 0xF4,
+
+
+ // The FBlockID 0xFF is a wildcard value.
+ ALL = 0xFF};
+
+};
+
+
+
+#endif //CMOSTCONST_H
diff --git a/Master/Embedded Frameworks/EF_Prakt2.patch b/Master/Embedded Frameworks/EF_Prakt2.patch
new file mode 100644
index 0000000..8b40074
--- /dev/null
+++ b/Master/Embedded Frameworks/EF_Prakt2.patch
@@ -0,0 +1,614 @@
+diff -uNr FrameworkOrig/src/base/CContext.cpp Framework/src/base/CContext.cpp
+--- FrameworkOrig/src/base/CContext.cpp 2010-04-01 19:23:12.000000000 +0200
++++ Framework/src/base/CContext.cpp 2010-04-21 12:46:33.055914910 +0200
+@@ -17,14 +17,17 @@
+ const char* TUNER_COMPONENT_NAME = "TunerComponent";
+ const char* NAVI_COMPONENT_NAME = "NaviComponent";
+ const char* CD_COMPONENT_NAME = "CdComponent";
++const char* HMIGL_COMPONENT_NAME = "HmiGLComponent";
+
+ const Int32 CContext::ADMIN_STACK_SIZE = 1000;
+ const Int32 CContext::MDISP_STACK_SIZE = 1000;
+ const Int32 CContext::HMI_STACK_SIZE = 1000;
+-const Int32 CContext::GL_STACK_SIZE = 120000;
++//const Int32 CContext::GL_STACK_SIZE = 120000;
++const Int32 CContext::GL_STACK_SIZE = 1000;
+ const Int32 CContext::TUNER_STACK_SIZE = 1000;
+ const Int32 CContext::NAVI_STACK_SIZE = 1000;
+ const Int32 CContext::CD_STACK_SIZE = 1000;
++const Int32 CContext::HMIGL_STACK_SIZE = 120000;
+ const Int32 CContext::DEFAULT_STACK_SIZE = 1000;
+
+ const CThread::EPriority CContext::ADMIN_PRIORITY = CThread::PRIORITY_NORM;
+@@ -33,6 +36,7 @@
+ const CThread::EPriority CContext::TUNER_PRIORITY = CThread::PRIORITY_NORM;
+ const CThread::EPriority CContext::NAVI_PRIORITY = CThread::PRIORITY_NORM;
+ const CThread::EPriority CContext::CD_PRIORITY = CThread::PRIORITY_NORM;
++const CThread::EPriority CContext::HMIGL_PRIORITY = CThread::PRIORITY_NORM;
+ const CThread::EPriority CContext::DEFAULT_PRIORITY = CThread::PRIORITY_NORM;
+
+ // these are the values defining the cpu/thread affinities;
+@@ -44,6 +48,7 @@
+ const Int32 CContext::TUNER_AFFINITY = 4;
+ const Int32 CContext::NAVI_AFFINITY = 5;
+ const Int32 CContext::CD_AFFINITY = 6;
++const Int32 CContext::HMIGL_AFFINITY = 3;
+ const Int32 CContext::DEFAULT_AFFINITY = 7;
+
+ const Int32 ADMIN_NORMALQUEUESIZE = 100; // Number of Messages
+@@ -52,6 +57,7 @@
+ const Int32 TUNER_NORMALQUEUESIZE = 100;
+ const Int32 NAVI_NORMALQUEUESIZE = 100;
+ const Int32 CD_NORMALQUEUESIZE = 100;
++const Int32 HMIGL_NORMALQUEUESIZE = 100;
+
+ const Int32 ADMIN_SYSTEMQUEUESIZE = 100;
+ const Int32 MDISP_SYSTEMQUEUESIZE = 100;
+@@ -59,6 +65,7 @@
+ const Int32 TUNER_SYSTEMQUEUESIZE = 100;
+ const Int32 NAVI_SYSTEMQUEUESIZE = 100;
+ const Int32 CD_SYSTEMQUEUESIZE = 100;
++const Int32 HMIGL_SYSTEMQUEUESIZE = 100;
+
+ const Int32 ADMIN_INTERNALQUEUESIZE = 4;
+ const Int32 MDISP_INTERNALQUEUESIZE = 4;
+@@ -66,6 +73,7 @@
+ const Int32 TUNER_INTERNALQUEUESIZE = 4;
+ const Int32 NAVI_INTERNALQUEUESIZE = 4;
+ const Int32 CD_INTERNALQUEUESIZE = 4;
++const Int32 HMIGL_INTERNALQUEUESIZE = 4;
+
+ const Int32 ADMIN_DCSIZE = 0;
+ const Int32 MDISP_DCSIZE = 0;
+@@ -73,6 +81,7 @@
+ const Int32 TUNER_DCSIZE = MAKE_ALIGNMENT_SIZE(sizeof(CTunerDataContainer)); // in Byte
+ const Int32 NAVI_DCSIZE = 0; // das wird ersetzt, wenn die Containter eingefuehrt werden
+ const Int32 CD_DCSIZE = 0;
++const Int32 HMIGL_DCSIZE = MAKE_ALIGNMENT_SIZE(sizeof(CHmiGlDataContainer));
+
+ const Int32 ADMIN_WDLIMIT = 2;
+ const Int32 MDISP_WDLIMIT = 2;
+@@ -80,6 +89,7 @@
+ const Int32 TUNER_WDLIMIT = 2;
+ const Int32 NAVI_WDLIMIT = 2;
+ const Int32 CD_WDLIMIT = 2;
++const Int32 HMIGL_WDLIMIT = 2;
+
+ /// Groessenberechnungen durch den Compiler
+
+@@ -107,9 +117,13 @@
+ CD_CONTEXT_SIZE = HEADER_SIZE + QUEUE_SIZE(CD_NORMALQUEUESIZE)
+ + QUEUE_SIZE(CD_SYSTEMQUEUESIZE) + QUEUE_SIZE(CD_INTERNALQUEUESIZE)
+ + CD_DCSIZE,
++ HMIGL_CONTEXT_SIZE = HEADER_SIZE + QUEUE_SIZE(HMIGL_NORMALQUEUESIZE)
++ + QUEUE_SIZE(HMIGL_SYSTEMQUEUESIZE) + QUEUE_SIZE(HMIGL_INTERNALQUEUESIZE)
++ + HMIGL_DCSIZE,
+
+ TOTAL_SIZE = ADMIN_CONTEXT_SIZE + MDISP_CONTEXT_SIZE + HMI_CONTEXT_SIZE
+ + TUNER_CONTEXT_SIZE + NAVI_CONTEXT_SIZE + CD_CONTEXT_SIZE
++ + HMIGL_CONTEXT_SIZE
+ };
+
+ static const CContextDescription sDescriptionTable[] =
+@@ -136,7 +150,10 @@
+ NAVI_DCSIZE, NAVI_WDLIMIT, NAVI_CONTEXT_SIZE },
+ { CD_INDEX, CD_COMPONENT_NAME, CContext::CD_AFFINITY, CContext::CD_STACK_SIZE,
+ CContext::CD_PRIORITY, CD_NORMALQUEUESIZE, CD_SYSTEMQUEUESIZE,
+- CD_INTERNALQUEUESIZE, CD_DCSIZE, CD_WDLIMIT, CD_CONTEXT_SIZE } };
++ CD_INTERNALQUEUESIZE, CD_DCSIZE, CD_WDLIMIT, CD_CONTEXT_SIZE },
++{ HMIGL_INDEX, HMIGL_COMPONENT_NAME, CContext::HMIGL_AFFINITY, CContext::HMIGL_STACK_SIZE,
++ CContext::HMIGL_PRIORITY, HMIGL_NORMALQUEUESIZE, HMIGL_SYSTEMQUEUESIZE,
++ HMIGL_INTERNALQUEUESIZE, HMIGL_DCSIZE, HMIGL_WDLIMIT, HMIGL_CONTEXT_SIZE } };
+
+ CComponentContext CContext::sContextTable[NUM_OF_COMPONENTS]; // wg. static
+
+@@ -199,6 +216,11 @@
+ return sContextTable[CD_INDEX];
+ }
+
++CComponentContext& CContext::getHMIGLContext(void)
++{
++ return sContextTable[HMIGL_INDEX];
++}
++
+ CComponentContext& CContext::getContext(Component_Index Index)
+ {
+ return sContextTable[Index];
+diff -uNr FrameworkOrig/src/base/CContext.h Framework/src/base/CContext.h
+--- FrameworkOrig/src/base/CContext.h 2010-04-01 19:23:12.000000000 +0200
++++ Framework/src/base/CContext.h 2010-04-21 12:45:56.263624839 +0200
+@@ -33,6 +33,10 @@
+ #include "CTunerDataContainer.h"
+ #endif
+
++#ifndef _CHMIGLDATACONTAINER_H
++ #include "CHmiGlDataContainer.h"
++#endif
++
+ #ifndef _FWASSERTION_H
+ #include "FWAssertion.h" // for assertion
+ #endif
+@@ -57,6 +61,7 @@
+ TUNER_INDEX,
+ NAVI_INDEX,
+ CD_INDEX,
++ HMIGL_INDEX,
+ /**
+ * Das hat immer als letzter Eintrag nach den adressierbaren
+ * Komponenten zu folgen!
+@@ -104,6 +109,7 @@
+ static CComponentContext& getTunerContext(void);
+ static CComponentContext& getNaviContext(void);
+ static CComponentContext& getCdContext(void);
++ static CComponentContext& getHMIGLContext(void);
+ static CComponentContext& getContext(Component_Index Index);
+
+ static const Int32 ADMIN_STACK_SIZE;
+@@ -113,6 +119,7 @@
+ static const Int32 TUNER_STACK_SIZE;
+ static const Int32 NAVI_STACK_SIZE;
+ static const Int32 CD_STACK_SIZE;
++ static const Int32 HMIGL_STACK_SIZE;
+ static const Int32 DEFAULT_STACK_SIZE;
+
+ static const CThread::EPriority ADMIN_PRIORITY;
+@@ -121,6 +128,7 @@
+ static const CThread::EPriority TUNER_PRIORITY;
+ static const CThread::EPriority NAVI_PRIORITY;
+ static const CThread::EPriority CD_PRIORITY;
++ static const CThread::EPriority HMIGL_PRIORITY;
+ static const CThread::EPriority DEFAULT_PRIORITY;
+
+ static const Int32 ADMIN_AFFINITY;
+@@ -129,6 +137,7 @@
+ static const Int32 TUNER_AFFINITY;
+ static const Int32 NAVI_AFFINITY;
+ static const Int32 CD_AFFINITY;
++ static const Int32 HMIGL_AFFINITY;
+ static const Int32 DEFAULT_AFFINITY;
+
+
+diff -uNr FrameworkOrig/src/components/CAdminComponent.cpp Framework/src/components/CAdminComponent.cpp
+--- FrameworkOrig/src/components/CAdminComponent.cpp 2010-04-01 20:58:59.000000000 +0200
++++ Framework/src/components/CAdminComponent.cpp 2010-04-22 15:44:25.664810465 +0200
+@@ -54,9 +54,9 @@
+ /*
+ * GL thread for graphics
+ */
+- CHmiGLThread gl;
+- CThread GLThread(gl, "GLThread", CContext::GL_STACK_SIZE,
+- CContext::DEFAULT_PRIORITY, CContext::HMI_AFFINITY, false);
++ CHmiGLThread gl(CContext::getHMIGLContext());
++ CThread GLThread(gl, "HMI_GL_Component_Thread", CContext::HMIGL_STACK_SIZE,
++ CContext::HMIGL_PRIORITY, CContext::HMIGL_AFFINITY, false);
+ GLThread.start();
+
+ CThread CHmiComponent_thread(hmi,
+diff -uNr FrameworkOrig/src/components/CAdminComponent.h Framework/src/components/CAdminComponent.h
+--- FrameworkOrig/src/components/CAdminComponent.h 2010-04-01 19:23:12.000000000 +0200
++++ Framework/src/components/CAdminComponent.h 2010-04-21 12:35:37.255677517 +0200
+@@ -33,6 +33,10 @@
+ #include "CHmiGLThread.h"
+ #endif
+
++#ifndef _CHMIGLDATACONTAINER_H
++ #include "CHmiGlDataContainer.h"
++#endif
++
+ #ifndef _CTUNERCOMPONENT_H
+ #include "CTunerComponent.h"
+ #endif
+diff -uNr FrameworkOrig/src/components/CHmiComponent.cpp Framework/src/components/CHmiComponent.cpp
+--- FrameworkOrig/src/components/CHmiComponent.cpp 2010-04-01 19:23:12.000000000 +0200
++++ Framework/src/components/CHmiComponent.cpp 2010-04-22 14:48:41.551623726 +0200
+@@ -49,6 +49,9 @@
+
+ void CHmiComponent::handleKeyEvent(const CMessage& _m) {
+ const IcmKeyCode keycode = (IcmKeyCode) _m.getOpcode(); // could be used for giving the 'x times-pressed' count
++ char newtitle[CHmiGlDataContainer::MAX_LINE_LENGTH];
++ char newlines[CHmiGlDataContainer::NUM_LINES][CHmiGlDataContainer::MAX_LINE_LENGTH];
++ CHmiGlDataContainer* hmiGlContPtr = static_cast<CHmiGlDataContainer*>( &(CContext::getHMIGLContext().getContainer()) );
+
+ switch (keycode) {
+ case CD_KEY: {
+@@ -59,6 +62,23 @@
+ * to the GL component and setting its parameters in
+ * the DC.
+ */
++
++ strcpy(newtitle,"CD MENU");
++ strcpy(newlines[CHmiGlDataContainer::LINE_ONE],"CD ONE");
++ strcpy(newlines[CHmiGlDataContainer::LINE_TWO],"TRACK ONE");
++ strcpy(newlines[CHmiGlDataContainer::LINE_THREE],"GUESS A TRACK TITLE");
++ strcpy(newlines[CHmiGlDataContainer::LINE_FOUR],"ONE SECOND PLAYED");
++ color4f cdBgCol = {0.0f,1.0f,0.0f,1.0f};
++ hmiGlContPtr->setTitle(newtitle);
++ for(Int32 actLine=0;actLine<CHmiGlDataContainer::NUM_LINES;actLine++)
++ {
++ hmiGlContPtr->setLine(static_cast<CHmiGlDataContainer::LINES>(actLine),newlines[actLine]);
++ }
++ hmiGlContPtr->setBackgroundColor(cdBgCol);
++ CMessage updMsg(CMessage::Internal_App_Type);
++ updMsg.setSenderID(HMI_INDEX);
++ updMsg.setReceiverID(HMIGL_INDEX);
++ CContext::getMDispContext().getInternalQueue().add(updMsg,false);
+ }
+ break;
+
+@@ -70,6 +90,22 @@
+ * to the GL component and setting its parameters in
+ * the DC.
+ */
++ strcpy(newtitle,"TUNER MENU");
++ strcpy(newlines[CHmiGlDataContainer::LINE_ONE],"SUPER STATION");
++ strcpy(newlines[CHmiGlDataContainer::LINE_TWO],"FREQ X MHZ");
++ strcpy(newlines[CHmiGlDataContainer::LINE_THREE],"RDS SAYS NICE WEATHER TODAY");
++ strcpy(newlines[CHmiGlDataContainer::LINE_FOUR],"");
++ color4f tunerBgCol = {0.0f,0.0f,1.0f,1.0f};
++ hmiGlContPtr->setTitle(newtitle);
++ for(Int32 actLine=0;actLine<CHmiGlDataContainer::NUM_LINES;actLine++)
++ {
++ hmiGlContPtr->setLine(static_cast<CHmiGlDataContainer::LINES>(actLine),newlines[actLine]);
++ }
++ hmiGlContPtr->setBackgroundColor(tunerBgCol);
++ CMessage updMsg(CMessage::Internal_App_Type);
++ updMsg.setSenderID(HMI_INDEX);
++ updMsg.setReceiverID(HMIGL_INDEX);
++ CContext::getMDispContext().getInternalQueue().add(updMsg,false);
+ }
+ break;
+
+diff -uNr FrameworkOrig/src/components/CHmiComponent.h Framework/src/components/CHmiComponent.h
+--- FrameworkOrig/src/components/CHmiComponent.h 2010-04-01 21:00:27.000000000 +0200
++++ Framework/src/components/CHmiComponent.h 2010-04-22 14:58:50.319592697 +0200
+@@ -25,6 +25,8 @@
+ #include "Events.h"
+ #endif
+
++#include "CHmiGlDataContainer.h"
++
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+diff -uNr FrameworkOrig/src/gl/CHmiGlDataContainer.cpp Framework/src/gl/CHmiGlDataContainer.cpp
+--- FrameworkOrig/src/gl/CHmiGlDataContainer.cpp 1970-01-01 01:00:00.000000000 +0100
++++ Framework/src/gl/CHmiGlDataContainer.cpp 2010-04-22 14:38:44.943764102 +0200
+@@ -0,0 +1,53 @@
++/*
++ * CHmiGlDataContainer.cpp
++ *
++ * Created on: 21.04.2010
++ * Author: sven
++ */
++#include "CHmiGlDataContainer.h"
++
++void CHmiGlDataContainer::setTitle(const char *atitle)
++{
++ mMutex.take(true);
++ memset(mTitle,'\0',MAX_LINE_LENGTH);
++ strcpy(mTitle,atitle);
++ mMutex.give();
++}
++void CHmiGlDataContainer::setLine(const CHmiGlDataContainer::LINES lineIdx, const char *abody)
++{
++ mMutex.take(true);
++ memset(mLines[lineIdx],'\0',MAX_LINE_LENGTH);
++ strcpy(mLines[lineIdx],abody);
++ mMutex.give();
++}
++void CHmiGlDataContainer::setBackgroundColor(color4f& bgCol)
++{
++ mMutex.take(true);
++ for (UInt16 i=0;i<4;i++) {
++ mBackgroundColor[i] = bgCol[i];
++ }
++ mMutex.give();
++}
++bool CHmiGlDataContainer::getTitle(char* atitle)
++{
++ mMutex.take(true);
++ strcpy(atitle,mTitle);
++ mMutex.give();
++ return true;
++}
++bool CHmiGlDataContainer::getLine(const CHmiGlDataContainer::LINES lineIdx, char* aline)
++{
++ mMutex.take(true);
++ strcpy(aline,mLines[lineIdx]);
++ mMutex.give();
++ return true;
++}
++bool CHmiGlDataContainer::getBackgroundColor(color4f& aBgColor)
++{
++ mMutex.take(true);
++ for (UInt16 i=0;i<4;i++) {
++ aBgColor[i] = mBackgroundColor[i];
++ }
++ mMutex.give();
++ return true;
++}
+diff -uNr FrameworkOrig/src/gl/CHmiGlDataContainer.h Framework/src/gl/CHmiGlDataContainer.h
+--- FrameworkOrig/src/gl/CHmiGlDataContainer.h 1970-01-01 01:00:00.000000000 +0100
++++ Framework/src/gl/CHmiGlDataContainer.h 2010-04-22 15:08:24.223581008 +0200
+@@ -0,0 +1,57 @@
++/*
++ * CHmiGlDataContainer.h
++ *
++ * Created on: 21.04.2010
++ * Author: sven
++ */
++#ifndef _CHMIGLDATACONTAINER_H
++#define _CHMIGLDATACONTAINER_H
++
++#ifdef QNX
++#ifdef EGL
++#include <GLES/gl.h>
++#include <GLES/egl.h>
++#include <gf/gf3d.h>
++#elif GFX
++#include "gfx.h" // QNX GF-Framework and freetype library
++#endif
++#elif LINUX
++#include <GL/gl.h>
++#include <GL/glut.h>
++#endif
++
++#ifndef _CMUTEX_H
++ #include "CMutex.h"
++#endif
++#ifndef CCONTAINER_H_
++ #include "CContainer.h"
++#endif
++#ifndef CFONTRENDERER_H_
++ #include "CFontRenderer.h"
++#endif
++
++#include <string.h>
++
++typedef GLfloat color4f[4];
++
++class CHmiGlDataContainer : public CContainer
++{
++public:
++ enum LINES {
++ LINE_ONE, LINE_TWO, LINE_THREE, LINE_FOUR, NUM_LINES
++ };
++ const static Int32 MAX_LINE_LENGTH=60;
++ void setTitle(const char*);
++ void setLine(const CHmiGlDataContainer::LINES, const char*);
++ void setBackgroundColor(color4f&);
++ bool getTitle(char*);
++ bool getLine(const CHmiGlDataContainer::LINES, char*);
++ bool getBackgroundColor(color4f&);
++private:
++ CMutex mMutex;
++ char mTitle[MAX_LINE_LENGTH];
++ char mLines[NUM_LINES][MAX_LINE_LENGTH];
++ color4f mBackgroundColor;
++};
++
++#endif /* CHMIGLDATACONTAINER_H_ */
+diff -uNr FrameworkOrig/src/gl/CHmiGLThread.cpp Framework/src/gl/CHmiGLThread.cpp
+--- FrameworkOrig/src/gl/CHmiGLThread.cpp 2010-04-01 21:00:52.000000000 +0200
++++ Framework/src/gl/CHmiGLThread.cpp 2010-04-22 15:28:14.352408837 +0200
+@@ -13,6 +13,8 @@
+ #include "CHmiGLThread.h"
+ #include <errno.h>
+
++CHmiGLThread* CHmiGLThread::sInstancePtr;
++
+ #ifdef QNX
+ #ifdef GFX
+ GfxEglState CHmiGLThread::sGfxEglState;
+@@ -29,8 +31,32 @@
+ int width = WINDOW_WIDTH;
+ int height = WINDOW_HEIGHT;
+
++CHmiGLThread::CHmiGLThread(CComponentContext& theContext) :
++ mContext(theContext), mDispatcher(theContext.getNormalQueue(),
++ theContext.getSystemQueue(), theContext.getInternalQueue(),
++ theContext.getTriggerSemaphore())
++{
++ CHmiGLThread::sInstancePtr = this;
++ mDispatcher.setHandler(*this);
++}
++
++CHmiGLThread::~CHmiGLThread()
++{
++ stop();
++}
++
+ void CHmiGLThread::init()
+ {
++ CHmiGlDataContainer* hmiGlContPtr = static_cast<CHmiGlDataContainer*>(&mContext.getContainer());
++ char title[CHmiGlDataContainer::MAX_LINE_LENGTH];
++ char body[CHmiGlDataContainer::MAX_LINE_LENGTH];
++ strcpy(title,"EMBEDDED FRAMEWORKS");
++ hmiGlContPtr->setTitle(title);
++ strcpy(body,"THIS IS THE BODY TEXT OF THE PANEL WHERE YOU CAN PRINT INFOS");
++ hmiGlContPtr->setLine(CHmiGlDataContainer::LINE_ONE,body);
++ color4f initialBgColor = {0.38f,0.72f,1.0f,1.0f};
++ hmiGlContPtr->setBackgroundColor(initialBgColor);
++
+ #ifdef QNX
+ #ifdef GFX
+ memset(&sGfxEglState, 0, sizeof(sGfxEglState)); // passiert im Konstrukturaufruf
+@@ -236,9 +262,11 @@
+ glutSwapBuffers();
+ glutPostRedisplay();
+ #endif
+-
++ DEBUG_PRINT("waiting for new message to dispatch");
++ CHmiGLThread::getInstancePtr()->getDispatcher().dispatch(true);
++ DEBUG_PRINT("returned from dispatch");
+ //Polling
+- usleep(1500000);
++ //usleep(1500000);
+ }
+
+ /**
+@@ -287,29 +315,85 @@
+ WINDOW_WIDTH, WINDOW_HEIGHT, 0 /* top-right*/
+ };
+
+- glColor4f(0.38, 0.72, 1, 1); // steelblue
+-
++ //glColor4f(0.38, 0.72, 1, 1); // steelblue
++ CHmiGlDataContainer* hmiGlContPtr = static_cast<CHmiGlDataContainer*>(&(CHmiGLThread::getInstancePtr()->getComponentContext().getContainer()));
++ color4f bg;
++ hmiGlContPtr->getBackgroundColor(bg);
++ glColor4f(bg[0],bg[1],bg[2],bg[3]);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_SHORT, 0, vPanel);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+-
++ char title[CHmiGlDataContainer::MAX_LINE_LENGTH];
++ char lines[CHmiGlDataContainer::NUM_LINES][CHmiGlDataContainer::MAX_LINE_LENGTH];
++ hmiGlContPtr->getTitle(title);
++ DEBUG_PRINT("Title: %s",title);
++ for(Int32 actLine = CHmiGlDataContainer::LINE_ONE;
++ actLine < CHmiGlDataContainer::NUM_LINES;
++ actLine++) {
++ hmiGlContPtr->getLine(static_cast<CHmiGlDataContainer::LINES>(actLine),lines[actLine]);
++ DEBUG_PRINT("Line %d: %s",actLine,lines[actLine]);
++ }
+ /*
+ * draw child Elements
+ * hard coded text and position
+ */
+ #ifdef LINUX
+ CFontRenderer mTitelText;
+- CFontRenderer mBodyText;
++ //CFontRenderer mBodyText;
++ CFontRenderer mLinesText[CHmiGlDataContainer::NUM_LINES];
+ mTitelText.setPosition((WINDOW_WIDTH/2)-CFontRenderer::CHAR_WIDTH*10,
+ WINDOW_HEIGHT-CFontRenderer::CHAR_HEIGHT);
+- mBodyText.setPosition(70, WINDOW_HEIGHT/2);
+-
+- char titel[] = "EMBEDDED FRAMEWORKS";
+- char body[] = "THIS IS THE BODY TEXT OF THE PANEL WHERE YOU CAN PRINT INFOS";
+- mTitelText.printString(titel);
+- mBodyText.printString(body);
++ mTitelText.printString(title);
++ for(Int32 actLine = CHmiGlDataContainer::LINE_ONE;
++ actLine < CHmiGlDataContainer::NUM_LINES;
++ actLine++) {
++ mLinesText[actLine].setPosition(70, /*WINDOW_HEIGHT/2*/ WINDOW_HEIGHT - ( (CFontRenderer::CHAR_HEIGHT*2) + (CFontRenderer::CHAR_HEIGHT*2*actLine)) );
++ mLinesText[actLine].printString(lines[actLine]);
++ }
+ #endif
+ glFlush();
+
+ // mHmiComponent->getCurrentDrawable()->draw();
+ }
++void CHmiGLThread::handleMessage(const CMessage& msg)
++{
++ DEBUG_PRINT("%s handle message", mContext.getContextNamePtr());
++ switch(msg.getMessageType())
++ {
++ case CMessage::Key_Event_Type :
++ handleKeyEvent(msg);
++ break;
++ case CMessage::Internal_App_Type :
++ handleInternalEvent(msg);
++ break;
++ default:
++ break;
++ }
++}
++CDispatcher& CHmiGLThread::getDispatcher(void)
++{
++ return mDispatcher;
++}
++CComponentContext& CHmiGLThread::getComponentContext(void)
++{
++ return mContext;
++}
++CHmiGLThread* CHmiGLThread::getInstancePtr(void)
++{
++ return sInstancePtr;
++}
++void CHmiGLThread::handleKeyEvent(const CMessage& msg)
++{
++
++}
++void CHmiGLThread::handleInternalEvent(const CMessage& msg)
++{
++ switch(msg.getSenderID()) {
++ case HMI_INDEX: {
++
++ break;
++ }
++ default:
++ break;
++ }
++}
+diff -uNr FrameworkOrig/src/gl/CHmiGLThread.h Framework/src/gl/CHmiGLThread.h
+--- FrameworkOrig/src/gl/CHmiGLThread.h 2010-04-01 19:23:12.000000000 +0200
++++ Framework/src/gl/CHmiGLThread.h 2010-04-22 15:26:56.143700277 +0200
+@@ -14,6 +14,9 @@
+ #include <GL/glut.h>
+ #endif
+
++#ifndef _IMESSAGEHANDLER_H
++ #include "IMessageHandler.h"
++#endif
+ #ifndef _IRUNNABLE_H
+ #include "IRunnable.h"
+ #endif
+@@ -32,12 +35,24 @@
+ #include "CFontRenderer.h"
+ #endif
+
++#ifndef _CDISPATCHER_H
++ #include "CDispatcher.h"
++#endif
++
++#ifndef _CCONTEXT_H
++ #include "CContext.h"
++#endif
++
++#include "CHmiGlDataContainer.h"
++
+ #include <stdio.h>
+ #include <unistd.h>
+
+-class CHmiGLThread : public IRunnable
++class CHmiGLThread : public IRunnable, public IMessageHandler
+ {
+ public:
++ CHmiGLThread(CComponentContext&);
++ ~CHmiGLThread();
+ virtual void init();
+ virtual void run();
+ virtual void stop();
+@@ -46,6 +61,9 @@
+ virtual void reRun() {}
+ virtual void goToStandby() {}
+
++ virtual void handleMessage(const CMessage& msg);
++ virtual void handleInternalEvent(const CMessage& msg);
++ virtual void handleKeyEvent(const CMessage& msg);
+ /* must be static so it can
+ * be called from the C-function
+ * 'displayFunction()' defined in
+@@ -53,11 +71,19 @@
+ */
+ static void draw();
+
++ static CHmiGLThread* getInstancePtr(void);
++ CComponentContext& getComponentContext(void);
++ CDispatcher& getDispatcher(void);
+ #ifdef QNX
+ #ifdef GFX
+ static GfxEglState sGfxEglState;
+ #endif
+ #endif
++
++ private:
++ CComponentContext& mContext;
++ CDispatcher mDispatcher;
++ static CHmiGLThread* sInstancePtr;
+ };
+
+ #endif // CHMIGLTHREAD_H_
diff --git a/Master/Embedded Frameworks/Embedded_Frameworks_GL_Rahmenpaket.zip b/Master/Embedded Frameworks/Embedded_Frameworks_GL_Rahmenpaket.zip
new file mode 100644
index 0000000..cbe42f7
--- /dev/null
+++ b/Master/Embedded Frameworks/Embedded_Frameworks_GL_Rahmenpaket.zip
Binary files differ
diff --git a/Master/Embedded Frameworks/Embedded_Frameworks_Vorlesung_Kurzskript.pdf b/Master/Embedded Frameworks/Embedded_Frameworks_Vorlesung_Kurzskript.pdf
new file mode 100644
index 0000000..65f0e1d
--- /dev/null
+++ b/Master/Embedded Frameworks/Embedded_Frameworks_Vorlesung_Kurzskript.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Ergänzungen_zum_Buch.pdf b/Master/Embedded Frameworks/Ergänzungen_zum_Buch.pdf
new file mode 100644
index 0000000..f945f66
--- /dev/null
+++ b/Master/Embedded Frameworks/Ergänzungen_zum_Buch.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Framework_EmbFrameworks_SS10_20100401.tar.gz b/Master/Embedded Frameworks/Framework_EmbFrameworks_SS10_20100401.tar.gz
new file mode 100644
index 0000000..b4e11df
--- /dev/null
+++ b/Master/Embedded Frameworks/Framework_EmbFrameworks_SS10_20100401.tar.gz
Binary files differ
diff --git a/Master/Embedded Frameworks/Framework_embFrameworks_SS10_200100422.tar.gz b/Master/Embedded Frameworks/Framework_embFrameworks_SS10_200100422.tar.gz
new file mode 100644
index 0000000..7c85619
--- /dev/null
+++ b/Master/Embedded Frameworks/Framework_embFrameworks_SS10_200100422.tar.gz
Binary files differ
diff --git a/Master/Embedded Frameworks/MOST_Beispiele.pdf b/Master/Embedded Frameworks/MOST_Beispiele.pdf
new file mode 100644
index 0000000..972b7f2
--- /dev/null
+++ b/Master/Embedded Frameworks/MOST_Beispiele.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/MiniComDriver_KKlein.zip b/Master/Embedded Frameworks/MiniComDriver_KKlein.zip
new file mode 100644
index 0000000..7a84a85
--- /dev/null
+++ b/Master/Embedded Frameworks/MiniComDriver_KKlein.zip
Binary files differ
diff --git a/Master/Embedded Frameworks/Philo0_QNX.zip b/Master/Embedded Frameworks/Philo0_QNX.zip
new file mode 100644
index 0000000..82cc15d
--- /dev/null
+++ b/Master/Embedded Frameworks/Philo0_QNX.zip
Binary files differ
diff --git a/Master/Embedded Frameworks/Prak2.patch b/Master/Embedded Frameworks/Prak2.patch
new file mode 100644
index 0000000..126cd6a
--- /dev/null
+++ b/Master/Embedded Frameworks/Prak2.patch
@@ -0,0 +1,506 @@
+diff -uNr Framework/Makefile /home/ldapusers/istpischn/EF_P2/Framework/Makefile
+--- Framework/Makefile 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/Makefile 2010-04-26 10:49:19.000000000 +0200
+@@ -110,6 +110,7 @@
+ $(BINDIR)/CMiniCommander.o \
+ $(BINDIR)/CMiniComDriver.o \
+ $(BINDIR)/CMaxiComReceiver.o \
++$(BINDIR)/CHmiGlDataContainer.o \
+ $(BINDIR)/main.o \
+ $(TARGETOBJS)
+
+diff -uNr Framework/src/base/CContext.cpp /home/ldapusers/istpischn/EF_P2/Framework/src/base/CContext.cpp
+--- Framework/src/base/CContext.cpp 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/base/CContext.cpp 2010-04-26 10:47:30.000000000 +0200
+@@ -17,6 +17,7 @@
+ const char* TUNER_COMPONENT_NAME = "TunerComponent";
+ const char* NAVI_COMPONENT_NAME = "NaviComponent";
+ const char* CD_COMPONENT_NAME = "CdComponent";
++const char* HMIGL_COMPONENT_NAME = "HmiGlComponent";
+
+ const Int32 CContext::ADMIN_STACK_SIZE = 1000;
+ const Int32 CContext::MDISP_STACK_SIZE = 1000;
+@@ -33,6 +34,7 @@
+ const CThread::EPriority CContext::TUNER_PRIORITY = CThread::PRIORITY_NORM;
+ const CThread::EPriority CContext::NAVI_PRIORITY = CThread::PRIORITY_NORM;
+ const CThread::EPriority CContext::CD_PRIORITY = CThread::PRIORITY_NORM;
++const CThread::EPriority CContext::HMIGL_PRIORITY = CThread::PRIORITY_NORM;
+ const CThread::EPriority CContext::DEFAULT_PRIORITY = CThread::PRIORITY_NORM;
+
+ // these are the values defining the cpu/thread affinities;
+@@ -44,6 +46,7 @@
+ const Int32 CContext::TUNER_AFFINITY = 4;
+ const Int32 CContext::NAVI_AFFINITY = 5;
+ const Int32 CContext::CD_AFFINITY = 6;
++const Int32 CContext::HMIGL_AFFINITY = 6;
+ const Int32 CContext::DEFAULT_AFFINITY = 7;
+
+ const Int32 ADMIN_NORMALQUEUESIZE = 100; // Number of Messages
+@@ -52,6 +55,7 @@
+ const Int32 TUNER_NORMALQUEUESIZE = 100;
+ const Int32 NAVI_NORMALQUEUESIZE = 100;
+ const Int32 CD_NORMALQUEUESIZE = 100;
++const Int32 HMIGL_NORMALQUEUESIZE = 100;
+
+ const Int32 ADMIN_SYSTEMQUEUESIZE = 100;
+ const Int32 MDISP_SYSTEMQUEUESIZE = 100;
+@@ -59,6 +63,7 @@
+ const Int32 TUNER_SYSTEMQUEUESIZE = 100;
+ const Int32 NAVI_SYSTEMQUEUESIZE = 100;
+ const Int32 CD_SYSTEMQUEUESIZE = 100;
++const Int32 HMIGL_SYSTEMQUEUESIZE = 100;
+
+ const Int32 ADMIN_INTERNALQUEUESIZE = 4;
+ const Int32 MDISP_INTERNALQUEUESIZE = 4;
+@@ -66,6 +71,7 @@
+ const Int32 TUNER_INTERNALQUEUESIZE = 4;
+ const Int32 NAVI_INTERNALQUEUESIZE = 4;
+ const Int32 CD_INTERNALQUEUESIZE = 4;
++const Int32 HMIGL_INTERNALQUEUESIZE = 4;
+
+ const Int32 ADMIN_DCSIZE = 0;
+ const Int32 MDISP_DCSIZE = 0;
+@@ -73,6 +79,7 @@
+ const Int32 TUNER_DCSIZE = MAKE_ALIGNMENT_SIZE(sizeof(CTunerDataContainer)); // in Byte
+ const Int32 NAVI_DCSIZE = 0; // das wird ersetzt, wenn die Containter eingefuehrt werden
+ const Int32 CD_DCSIZE = 0;
++const Int32 HMIGL_DCSIZE = MAKE_ALIGNMENT_SIZE(sizeof(CHmiGlDataContainer)); // in Byte;
+
+ const Int32 ADMIN_WDLIMIT = 2;
+ const Int32 MDISP_WDLIMIT = 2;
+@@ -80,6 +87,7 @@
+ const Int32 TUNER_WDLIMIT = 2;
+ const Int32 NAVI_WDLIMIT = 2;
+ const Int32 CD_WDLIMIT = 2;
++const Int32 HMIGL_WDLIMIT = 2;
+
+ /// Groessenberechnungen durch den Compiler
+
+@@ -107,9 +115,11 @@
+ CD_CONTEXT_SIZE = HEADER_SIZE + QUEUE_SIZE(CD_NORMALQUEUESIZE)
+ + QUEUE_SIZE(CD_SYSTEMQUEUESIZE) + QUEUE_SIZE(CD_INTERNALQUEUESIZE)
+ + CD_DCSIZE,
+-
++ HMIGL_CONTEXT_SIZE = HEADER_SIZE + QUEUE_SIZE(HMIGL_NORMALQUEUESIZE)
++ + QUEUE_SIZE(HMIGL_SYSTEMQUEUESIZE) + QUEUE_SIZE(HMIGL_INTERNALQUEUESIZE)
++ + HMIGL_DCSIZE,
+ TOTAL_SIZE = ADMIN_CONTEXT_SIZE + MDISP_CONTEXT_SIZE + HMI_CONTEXT_SIZE
+- + TUNER_CONTEXT_SIZE + NAVI_CONTEXT_SIZE + CD_CONTEXT_SIZE
++ + TUNER_CONTEXT_SIZE + NAVI_CONTEXT_SIZE + CD_CONTEXT_SIZE + HMIGL_CONTEXT_SIZE
+ };
+
+ static const CContextDescription sDescriptionTable[] =
+@@ -136,7 +146,10 @@
+ NAVI_DCSIZE, NAVI_WDLIMIT, NAVI_CONTEXT_SIZE },
+ { CD_INDEX, CD_COMPONENT_NAME, CContext::CD_AFFINITY, CContext::CD_STACK_SIZE,
+ CContext::CD_PRIORITY, CD_NORMALQUEUESIZE, CD_SYSTEMQUEUESIZE,
+- CD_INTERNALQUEUESIZE, CD_DCSIZE, CD_WDLIMIT, CD_CONTEXT_SIZE } };
++ CD_INTERNALQUEUESIZE, CD_DCSIZE, CD_WDLIMIT, CD_CONTEXT_SIZE },
++{ HMIGL_INDEX, HMIGL_COMPONENT_NAME, CContext::HMIGL_AFFINITY, CContext::GL_STACK_SIZE,
++ CContext::HMIGL_PRIORITY, HMIGL_NORMALQUEUESIZE, HMIGL_SYSTEMQUEUESIZE,
++ HMIGL_INTERNALQUEUESIZE, HMIGL_DCSIZE, HMIGL_WDLIMIT, HMIGL_CONTEXT_SIZE } };
+
+ CComponentContext CContext::sContextTable[NUM_OF_COMPONENTS]; // wg. static
+
+@@ -199,6 +212,11 @@
+ return sContextTable[CD_INDEX];
+ }
+
++CComponentContext& CContext::getHmiGlContext(void)
++{
++ return sContextTable[HMIGL_INDEX];
++}
++
+ CComponentContext& CContext::getContext(Component_Index Index)
+ {
+ return sContextTable[Index];
+diff -uNr Framework/src/base/CContext.h /home/ldapusers/istpischn/EF_P2/Framework/src/base/CContext.h
+--- Framework/src/base/CContext.h 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/base/CContext.h 2010-04-26 10:47:33.000000000 +0200
+@@ -33,6 +33,10 @@
+ #include "CTunerDataContainer.h"
+ #endif
+
++#ifndef _CHMIGLDATACONTAINER_H
++ #include "CHmiGlDataContainer.h"
++#endif
++
+ #ifndef _FWASSERTION_H
+ #include "FWAssertion.h" // for assertion
+ #endif
+@@ -57,6 +61,7 @@
+ TUNER_INDEX,
+ NAVI_INDEX,
+ CD_INDEX,
++ HMIGL_INDEX,
+ /**
+ * Das hat immer als letzter Eintrag nach den adressierbaren
+ * Komponenten zu folgen!
+@@ -104,6 +109,7 @@
+ static CComponentContext& getTunerContext(void);
+ static CComponentContext& getNaviContext(void);
+ static CComponentContext& getCdContext(void);
++ static CComponentContext& getHmiGlContext(void);
+ static CComponentContext& getContext(Component_Index Index);
+
+ static const Int32 ADMIN_STACK_SIZE;
+@@ -121,6 +127,7 @@
+ static const CThread::EPriority TUNER_PRIORITY;
+ static const CThread::EPriority NAVI_PRIORITY;
+ static const CThread::EPriority CD_PRIORITY;
++ static const CThread::EPriority HMIGL_PRIORITY;
+ static const CThread::EPriority DEFAULT_PRIORITY;
+
+ static const Int32 ADMIN_AFFINITY;
+@@ -129,6 +136,7 @@
+ static const Int32 TUNER_AFFINITY;
+ static const Int32 NAVI_AFFINITY;
+ static const Int32 CD_AFFINITY;
++ static const Int32 HMIGL_AFFINITY;
+ static const Int32 DEFAULT_AFFINITY;
+
+
+diff -uNr Framework/src/commander/CMiniCommander.h /home/ldapusers/istpischn/EF_P2/Framework/src/commander/CMiniCommander.h
+--- Framework/src/commander/CMiniCommander.h 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/commander/CMiniCommander.h 2010-04-26 11:40:29.000000000 +0200
+@@ -14,7 +14,7 @@
+
+ #include <termios.h>
+
+-#ifdef __SH__
++#ifdef __QNX__
+ #define MC_DEVICE "/dev/ser1"
+ #else
+ #define MC_DEVICE "/dev/ttyS0"
+diff -uNr Framework/src/components/CAdminComponent.cpp /home/ldapusers/istpischn/EF_P2/Framework/src/components/CAdminComponent.cpp
+--- Framework/src/components/CAdminComponent.cpp 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/components/CAdminComponent.cpp 2010-04-26 10:25:16.000000000 +0200
+@@ -101,7 +101,7 @@
+ /*
+ * GL thread for graphics
+ */
+- CHmiGLThread gl;
++ CHmiGLThread gl(CContext::getHmiGlContext());
+ CThread GLThread(gl, "GLThread", CContext::GL_STACK_SIZE,
+ CContext::DEFAULT_PRIORITY, CContext::HMI_AFFINITY, false);
+ GLThread.start();
+diff -uNr Framework/src/components/CHmiComponent.cpp /home/ldapusers/istpischn/EF_P2/Framework/src/components/CHmiComponent.cpp
+--- Framework/src/components/CHmiComponent.cpp 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/components/CHmiComponent.cpp 2010-04-26 10:48:37.000000000 +0200
+@@ -49,6 +49,9 @@
+
+ void CHmiComponent::handleKeyEvent(const CMessage& _m) {
+ const IcmKeyCode keycode = (IcmKeyCode) _m.getOpcode(); // could be used for giving the 'x times-pressed' count
++ char newtitle[CHmiGlDataContainer::MAX_LINE_LENGTH];
++ char newlines[CHmiGlDataContainer::NUM_LINES][CHmiGlDataContainer::MAX_LINE_LENGTH];
++ CHmiGlDataContainer* hmiGlContPtr = static_cast<CHmiGlDataContainer*>( &(CContext::getHmiGlContext().getContainer()) );
+
+ switch (keycode) {
+ case CD_KEY: {
+@@ -59,6 +62,23 @@
+ * to the GL component and setting its parameters in
+ * the DC.
+ */
++
++ strcpy(newtitle,"CD MENU");
++ strcpy(newlines[CHmiGlDataContainer::LINE_ONE],"CD ONE");
++ strcpy(newlines[CHmiGlDataContainer::LINE_TWO],"TRACK ONE");
++ strcpy(newlines[CHmiGlDataContainer::LINE_THREE],"GUESS A TRACK TITLE");
++ strcpy(newlines[CHmiGlDataContainer::LINE_FOUR],"ONE SECOND PLAYED");
++ color4f cdBgCol = {0.0f,1.0f,0.0f,1.0f};
++ hmiGlContPtr->setTitle(newtitle);
++ for(Int32 actLine=0;actLine<CHmiGlDataContainer::NUM_LINES;actLine++)
++ {
++ hmiGlContPtr->setLine(static_cast<CHmiGlDataContainer::LINES>(actLine),newlines[actLine]);
++ }
++ hmiGlContPtr->setBackgroundColor(cdBgCol);
++ CMessage updMsg(CMessage::Internal_App_Type);
++ updMsg.setSenderID(HMI_INDEX);
++ updMsg.setReceiverID(HMIGL_INDEX);
++ CContext::getMDispContext().getInternalQueue().add(updMsg,false);
+ }
+ break;
+
+@@ -70,6 +90,22 @@
+ * to the GL component and setting its parameters in
+ * the DC.
+ */
++ strcpy(newtitle,"TUNER MENU");
++ strcpy(newlines[CHmiGlDataContainer::LINE_ONE],"SUPER STATION");
++ strcpy(newlines[CHmiGlDataContainer::LINE_TWO],"FREQ X MHZ");
++ strcpy(newlines[CHmiGlDataContainer::LINE_THREE],"RDS SAYS NICE WEATHER TODAY");
++ strcpy(newlines[CHmiGlDataContainer::LINE_FOUR],"");
++ color4f tunerBgCol = {0.0f,0.0f,1.0f,1.0f};
++ hmiGlContPtr->setTitle(newtitle);
++ for(Int32 actLine=0;actLine<CHmiGlDataContainer::NUM_LINES;actLine++)
++ {
++ hmiGlContPtr->setLine(static_cast<CHmiGlDataContainer::LINES>(actLine),newlines[actLine]);
++ }
++ hmiGlContPtr->setBackgroundColor(tunerBgCol);
++ CMessage updMsg(CMessage::Internal_App_Type);
++ updMsg.setSenderID(HMI_INDEX);
++ updMsg.setReceiverID(HMIGL_INDEX);
++ CContext::getMDispContext().getInternalQueue().add(updMsg,false);
+ }
+ break;
+
+diff -uNr Framework/src/gl/CHmiGlDataContainer.cpp /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGlDataContainer.cpp
+--- Framework/src/gl/CHmiGlDataContainer.cpp 1970-01-01 01:00:00.000000000 +0100
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGlDataContainer.cpp 2010-04-26 10:44:21.000000000 +0200
+@@ -0,0 +1,53 @@
++/*
++ * CHmiGlDataContainer.cpp
++ *
++ * Created on: 21.04.2010
++ * Author: sven
++ */
++#include "CHmiGlDataContainer.h"
++
++void CHmiGlDataContainer::setTitle(const char *atitle)
++{
++ mMutex.take(true);
++ memset(mTitle,'\0',MAX_LINE_LENGTH);
++ strcpy(mTitle,atitle);
++ mMutex.give();
++}
++void CHmiGlDataContainer::setLine(const CHmiGlDataContainer::LINES lineIdx, const char *abody)
++{
++ mMutex.take(true);
++ memset(mLines[lineIdx],'\0',MAX_LINE_LENGTH);
++ strcpy(mLines[lineIdx],abody);
++ mMutex.give();
++}
++void CHmiGlDataContainer::setBackgroundColor(color4f& bgCol)
++{
++ mMutex.take(true);
++ for (UInt16 i=0;i<4;i++) {
++ mBackgroundColor[i] = bgCol[i];
++ }
++ mMutex.give();
++}
++bool CHmiGlDataContainer::getTitle(char* atitle)
++{
++ mMutex.take(true);
++ strcpy(atitle,mTitle);
++ mMutex.give();
++ return true;
++}
++bool CHmiGlDataContainer::getLine(const CHmiGlDataContainer::LINES lineIdx, char* aline)
++{
++ mMutex.take(true);
++ strcpy(aline,mLines[lineIdx]);
++ mMutex.give();
++ return true;
++}
++bool CHmiGlDataContainer::getBackgroundColor(color4f& aBgColor)
++{
++ mMutex.take(true);
++ for (UInt16 i=0;i<4;i++) {
++ aBgColor[i] = mBackgroundColor[i];
++ }
++ mMutex.give();
++ return true;
++}
+diff -uNr Framework/src/gl/CHmiGlDataContainer.h /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGlDataContainer.h
+--- Framework/src/gl/CHmiGlDataContainer.h 1970-01-01 01:00:00.000000000 +0100
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGlDataContainer.h 2010-04-26 10:47:50.000000000 +0200
+@@ -0,0 +1,54 @@
++/*
++ * CHmiGlDataContainer.h
++ *
++ * Created on: 21.04.2010
++ * Author: sven
++ */
++#ifndef _CHMIGLDATACONTAINER_H
++#define _CHMIGLDATACONTAINER_H
++
++#ifdef QNX
++#ifdef EGL
++#include <GLES/gl.h>
++#include <GLES/egl.h>
++#include <gf/gf3d.h>
++#elif GFX
++#include "gfx.h" // QNX GF-Framework and freetype library
++#endif
++#elif LINUX
++#include <GL/gl.h>
++#include <GL/glut.h>
++#endif
++
++#ifndef _CMUTEX_H
++ #include "CMutex.h"
++#endif
++#ifndef CCONTAINER_H_
++ #include "CContainer.h"
++#endif
++
++#include <string.h>
++
++typedef GLfloat color4f[4];
++
++class CHmiGlDataContainer : public CContainer
++{
++public:
++ enum LINES {
++ LINE_ONE, LINE_TWO, LINE_THREE, LINE_FOUR, NUM_LINES
++ };
++ const static Int32 MAX_LINE_LENGTH=60;
++ void setTitle(const char*);
++ void setLine(const CHmiGlDataContainer::LINES, const char*);
++ void setBackgroundColor(color4f&);
++ bool getTitle(char*);
++ bool getLine(const CHmiGlDataContainer::LINES, char*);
++ bool getBackgroundColor(color4f&);
++private:
++ CMutex mMutex;
++ char mTitle[MAX_LINE_LENGTH];
++ char mLines[NUM_LINES][MAX_LINE_LENGTH];
++ color4f mBackgroundColor;
++};
++
++#endif /* CHMIGLDATACONTAINER_H_ */
+diff -uNr Framework/src/gl/CHmiGLThread.cpp /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGLThread.cpp
+--- Framework/src/gl/CHmiGLThread.cpp 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGLThread.cpp 2010-04-26 11:13:19.000000000 +0200
+@@ -28,7 +28,19 @@
+ GLbyte allindices[] = { 0, 1, 2, 0, 2, 3 };
+
+ AGraphicsDriver* CHmiGLThread::graphics = NULL;
++CHmiGLThread* CHmiGLThread::sInstancePtr = NULL;
++CHmiGLThread::CHmiGLThread(CComponentContext& context)
++ :mContext(context), mDispatcher(context.getNormalQueue(),
++ context.getSystemQueue(), context.getInternalQueue(),
++ context.getTriggerSemaphore())
++ {
++ mDispatcher.setHandler(*this);
++ CHmiGLThread::sInstancePtr = this;
++ }
++CHmiGLThread::~CHmiGLThread()
++{
+
++}
+ void CHmiGLThread::init()
+ {
+ DEBUG_PRINT("entered");
+@@ -75,7 +87,9 @@
+ counter++;
+
+ DEBUG_PRINT("entered (counter=%i)",counter)
+-
++ DEBUG_PRINT("calling dispatch");
++ CHmiGLThread::getInstancePtr()->mDispatcher.dispatch(true);
++ DEBUG_PRINT("after dispatch");
+ // /*
+ // * Define the vertices which
+ // * build a panel
+@@ -98,7 +112,7 @@
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glLineWidth(2.0);
+-
++/*
+ if (counter % 2) {
+ glColor4f(1.0, 0.0, 0.0, 1.0);
+ DEBUG_PRINT("color is red")
+@@ -106,6 +120,11 @@
+ glColor4f(0.0, 1.0, 0.0, 1.0);
+ DEBUG_PRINT("color is green")
+ }
++*/
++ CHmiGlDataContainer* hmiGlContPtr = static_cast<CHmiGlDataContainer*>(&(CHmiGLThread::getInstancePtr()->mContext.getContainer()));
++ color4f bg;
++ hmiGlContPtr->getBackgroundColor(bg);
++ glColor4f(bg[0],bg[1],bg[2],bg[3]);
+
+ glEnableClientState( GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_SHORT, 0, verticeArray);
+@@ -113,15 +132,46 @@
+ (GLubyte *) allindices);
+
+ // draw some text below and above the pane
+- char msg[80];
+- sprintf(msg, "Text below (cnt=%d)",counter);
++ //char msg[80];
++ //sprintf(msg, "Text below (cnt=%d)",counter);
++
++ //glColor4f(1.0, 1.0, 1.0, 1.0);
+
+- glColor4f(1.0, 1.0, 1.0, 1.0);
+- graphics->renderText(border, 0, msg);
+- graphics->renderText(border, height - border, "Text above",CFTRender::FONT_SIZE_MINI);
++ char title[CHmiGlDataContainer::MAX_LINE_LENGTH];
++ char lines[CHmiGlDataContainer::NUM_LINES][CHmiGlDataContainer::MAX_LINE_LENGTH];
++ hmiGlContPtr->getTitle(title);
++ DEBUG_PRINT("Title: %s",title);
++ for(Int32 actLine = CHmiGlDataContainer::LINE_ONE;
++ actLine < CHmiGlDataContainer::NUM_LINES;
++ actLine++) {
++ hmiGlContPtr->getLine(static_cast<CHmiGlDataContainer::LINES>(actLine),lines[actLine]);
++ DEBUG_PRINT("Line %d: %s",actLine,lines[actLine]);
++ }
++
++ //graphics->renderText(border, 0, msg);
++ graphics->renderText(border, 0, title);
++ for(Int32 actLine = CHmiGlDataContainer::LINE_ONE;
++ actLine < CHmiGlDataContainer::NUM_LINES;
++ actLine++) {
++ graphics->renderText(border,(WINDOW_HEIGHT - border - 30) - (30*actLine),lines[actLine]);
++ }
++ //graphics->renderText(border, height - border, "Text above",CFTRender::FONT_SIZE_MINI);
+
+ graphics->finishDraw(); // dependency to graphics driver
+
+ glFinish();
+
++/* DEBUG_PRINT("calling dispatch");
++ CHmiGLThread::getInstancePtr()->mDispatcher.dispatch(true);
++ DEBUG_PRINT("after dispatch");*/
++
++}
++void CHmiGLThread::handleMessage(const CMessage& msg)
++{
++ DEBUG_PRINT("handle Message");
++}
++
++CHmiGLThread* CHmiGLThread::getInstancePtr(void)
++{
++ return sInstancePtr;
+ }
+diff -uNr Framework/src/gl/CHmiGLThread.h /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGLThread.h
+--- Framework/src/gl/CHmiGLThread.h 2010-04-22 17:05:16.000000000 +0200
++++ /home/ldapusers/istpischn/EF_P2/Framework/src/gl/CHmiGLThread.h 2010-04-26 10:34:18.000000000 +0200
+@@ -20,9 +20,11 @@
+ #include <stdio.h>
+ #include <unistd.h>
+
+-class CHmiGLThread : public IRunnable
++class CHmiGLThread : public IRunnable, public IMessageHandler
+ {
+ public:
++ CHmiGLThread(CComponentContext&);
++ ~CHmiGLThread();
+ virtual void init();
+ virtual void run();
+ virtual void stop();
+@@ -30,6 +32,7 @@
+ virtual void prepareForShutdown() {}
+ virtual void reRun() {}
+ virtual void goToStandby() {}
++ virtual void handleMessage(const CMessage& msg);
+
+ /* must be static so it can
+ * be called from the C-function
+@@ -37,8 +40,13 @@
+ * CHmiGLThread.cpp
+ */
+ static void draw();
++ static CHmiGLThread* getInstancePtr();
+
+ static AGraphicsDriver* graphics;
++ private:
++ CComponentContext& mContext;
++ CDispatcher mDispatcher;
++ static CHmiGLThread* sInstancePtr;
+ };
+
+ #endif // CHMIGLTHREAD_H_
diff --git a/Master/Embedded Frameworks/Prakt5/watchdog.tar.bz2 b/Master/Embedded Frameworks/Prakt5/watchdog.tar.bz2
new file mode 100644
index 0000000..5c69448
--- /dev/null
+++ b/Master/Embedded Frameworks/Prakt5/watchdog.tar.bz2
Binary files differ
diff --git a/Master/Embedded Frameworks/Prakt5/watchdog/Makefile b/Master/Embedded Frameworks/Prakt5/watchdog/Makefile
new file mode 100644
index 0000000..6e9c04e
--- /dev/null
+++ b/Master/Embedded Frameworks/Prakt5/watchdog/Makefile
@@ -0,0 +1,21 @@
+CC = g++
+LD = g++
+LIBS = -lrt
+CFLAGS = -DLINUX -Wall
+BINFILE = hwwatchdog
+OBJFILE = hwwatchdog.o
+SRCFILE = hwwatchdog.cpp
+
+all:
+ @echo "config:"
+ @echo "$(LIBS)"
+ @echo "$(CFLAGS)"
+ @echo "$(CC)"
+ @echo "Compiling $(OBJFILE)"
+ $(CC) $(CFLAGS) -c -o $(OBJFILE) $(SRCFILE)
+ @echo "Linking $(BINFILE)"
+ $(LD) $(CFLAGS) -o $(BINFILE) $(OBJFILE) $(LIBS)
+
+clean:
+ rm -f $(BINFILE) $(OBJFILE)
+
diff --git a/Master/Embedded Frameworks/Prakt5/watchdog/hwwatchdog.cpp b/Master/Embedded Frameworks/Prakt5/watchdog/hwwatchdog.cpp
new file mode 100644
index 0000000..626f20c
--- /dev/null
+++ b/Master/Embedded Frameworks/Prakt5/watchdog/hwwatchdog.cpp
@@ -0,0 +1,140 @@
+// File: hwwatchdog.cpp
+// Purpose: Simulate a HW-Watchdog, which kills given processes after a given interval,
+// if it was not triggered on a named semaphore. see usage text.
+// Authors: Pierre Schnarz, Sven Eisenhauer
+// 14.06.2010 Initial coding
+//
+// Note: Named Semaphore code is POSIX. Tested on Linux only, show work on QNX.
+// Perhaps check header files on QNX
+// Important: in killProcs change cmd to list processes!
+//
+#ifdef LINUX
+
+#include <semaphore.h>
+#include <time.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+
+// ugly global variables. needed in sig_handler
+char* semName;
+sem_t* semPtr;
+
+void usage(const char* progname)
+{
+ printf("Usage: %s <timeout> <semaphore_name> <proc_name>\n",progname);
+ printf("\ttimeout:\tseconds to wait until watchdog time out\n");
+ printf("\tsemaphore_name:\tname of the semaphore to trigger watchdog\n");
+ printf("\t\t\tfull path will become /dev/shm/sem.<semaphore_name>\n");
+ printf("\tproc_name: fname (executable name) of processes to kill\n");
+ printf("Exit with Crtl-C\n");
+}
+
+void sigint_handler(int sig) {
+ printf("exiting\n");
+ sem_close(semPtr);
+ sem_unlink(semName);
+ exit(EXIT_SUCCESS);
+}
+
+void killProcs(char* procName)
+{
+ FILE* fp;
+ const int BUFF_SIZE = 4096;
+ //TODO: make cmd portable to QNX (pidin something...)
+ const char* cmd = "ps -eo pid,fname";
+ char buffer[BUFF_SIZE];
+ fp = popen(cmd,"r");
+ int pid = -1;
+ int byte_count = 0;
+ char res;
+ int kill_res = -1;
+ while (((res = fgetc(fp)) != EOF) && (byte_count < BUFF_SIZE) )
+ {
+ buffer[byte_count++] = res;
+ }
+ char* line = strtok(buffer,"\n");
+ //int line_count = 0;
+ while( (line=strtok(NULL,"\n")) != NULL ) {
+ char fname[8];
+ sscanf(line,"%d %s",&pid,fname);
+ //printf("line %d: [%s] pid: %d fname: [%s]\n",++line_count,line,pid,fname);
+ if(strncmp(procName,fname,8) == 0) {
+ printf("killing process %s pid:%d\n",fname,pid);
+ kill_res = kill(pid,SIGTERM);
+ if(kill_res != 0) {
+ printf("Error killing %d : %d\n",pid,errno);
+ } else {
+ printf("Killed %d\n",pid);
+ }
+ }
+ }
+ pclose(fp);
+}
+
+int main(int argc, char** argv)
+{
+ struct timespec ts;
+ mode_t semMode = S_IRWXU|S_IRWXG|S_IRWXO;
+ int s;
+ long timeOut;
+ const char* progName = argv[0];
+ char* proc;
+
+ if(argc != 4) {
+ usage(progName);
+ exit(EXIT_FAILURE);
+ }
+
+ timeOut = strtol(argv[1],NULL,10);
+ semName = argv[2];
+ proc = argv[3];
+ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
+ printf("clock_gettime failed\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // set signal handler for cleanup
+ (void) signal(SIGINT,sigint_handler);
+
+
+ ts.tv_sec += timeOut; // wait timeOut seconds
+ semPtr = sem_open(semName,O_CREAT,semMode,0);
+ if(SEM_FAILED == semPtr) {
+ printf("Could not create named semaphore\n");
+ return -1;
+ }
+ do
+ {
+ // wait until time specified in ts on semaphore
+ s = sem_timedwait(semPtr, &ts);
+ /* Check what happened */
+ if (s == -1) {
+ if (errno == ETIMEDOUT) {
+ printf("sem_timedwait() timed out\n");
+ printf("kill Proccesses\n");
+ killProcs(proc);
+ }
+ else {
+ printf("sem_timedwait some other error: %d\n",errno);
+ exit(EXIT_FAILURE);
+ }
+ } else {
+ printf("sem_timedwait() succeeded. Watchdog triggered\n");
+ }
+ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
+ printf("clock_gettime failed\n");
+ return -1;
+ }
+ ts.tv_sec += timeOut; // wait timeOut seconds
+ printf("next loop hw watchdog\n");
+ } while (true);
+ exit(EXIT_SUCCESS);
+}
+
+#endif // LINUX
diff --git a/Master/Embedded Frameworks/Prakt5/wd-framework.tar.bz2 b/Master/Embedded Frameworks/Prakt5/wd-framework.tar.bz2
new file mode 100644
index 0000000..3312dfb
--- /dev/null
+++ b/Master/Embedded Frameworks/Prakt5/wd-framework.tar.bz2
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_1_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_1_10.pdf
new file mode 100644
index 0000000..673e98f
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_1_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_2_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_2_10.pdf
new file mode 100644
index 0000000..287fe06
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_2_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_3_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_3_10.pdf
new file mode 100644
index 0000000..9b9ff30
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_3_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_4_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_4_10.pdf
new file mode 100644
index 0000000..741cade
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_4_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_5_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_5_10.pdf
new file mode 100644
index 0000000..db236cd
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_5_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6a_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6a_10.pdf
new file mode 100644
index 0000000..879dc1d
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6a_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6b_10.pdf b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6b_10.pdf
new file mode 100644
index 0000000..89abdd7
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Embedded_Frameworks_6b_10.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Philo0_QNX.zip b/Master/Embedded Frameworks/Uebungen/Philo0_QNX.zip
new file mode 100644
index 0000000..e27c4d1
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Philo0_QNX.zip
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen/Target-Debugging.pdf b/Master/Embedded Frameworks/Uebungen/Target-Debugging.pdf
new file mode 100644
index 0000000..61d4b14
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen/Target-Debugging.pdf
Binary files differ
diff --git a/Master/Embedded Frameworks/Uebungen_EmbFrameworks_SS10_20100401.tar.gz b/Master/Embedded Frameworks/Uebungen_EmbFrameworks_SS10_20100401.tar.gz
new file mode 100644
index 0000000..9eb38ce
--- /dev/null
+++ b/Master/Embedded Frameworks/Uebungen_EmbFrameworks_SS10_20100401.tar.gz
Binary files differ
diff --git a/Master/Embedded Frameworks/managed_Framework_2_stripped.zip b/Master/Embedded Frameworks/managed_Framework_2_stripped.zip
new file mode 100644
index 0000000..458a4bd
--- /dev/null
+++ b/Master/Embedded Frameworks/managed_Framework_2_stripped.zip
Binary files differ
diff --git a/Master/Embedded Frameworks/minimost.tar b/Master/Embedded Frameworks/minimost.tar
new file mode 100644
index 0000000..e4b7fa4
--- /dev/null
+++ b/Master/Embedded Frameworks/minimost.tar
Binary files differ
diff --git a/Master/Embedded Frameworks/p3b.tar.gz b/Master/Embedded Frameworks/p3b.tar.gz
new file mode 100644
index 0000000..9f82626
--- /dev/null
+++ b/Master/Embedded Frameworks/p3b.tar.gz
Binary files differ
diff --git a/Master/Embedded Frameworks/prakt1.diff b/Master/Embedded Frameworks/prakt1.diff
new file mode 100644
index 0000000..5f0dd53
--- /dev/null
+++ b/Master/Embedded Frameworks/prakt1.diff
@@ -0,0 +1,78 @@
+Binärdateien ../FrameworkOrig/Framework/CAdminComponent.o and Framework/CAdminComponent.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CBinarySemaphore.o and Framework/CBinarySemaphore.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CCdComponent.o and Framework/CCdComponent.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CCommQueue.o and Framework/CCommQueue.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CComponentContext.o and Framework/CComponentContext.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CContext.o and Framework/CContext.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CDispatcher.o and Framework/CDispatcher.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CFontRenderer.o and Framework/CFontRenderer.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CHmiComponent.o and Framework/CHmiComponent.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CHmiGLThread.o and Framework/CHmiGLThread.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CMainDispatcher.o and Framework/CMainDispatcher.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CMaxiComReceiver.o and Framework/CMaxiComReceiver.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CMiniComDriver.o and Framework/CMiniComDriver.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CMiniCommander.o and Framework/CMiniCommander.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CMutex.o and Framework/CMutex.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CNaviComponent.o and Framework/CNaviComponent.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CThread.o and Framework/CThread.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/CTunerComponent.o and Framework/CTunerComponent.o sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/Framework and Framework/Framework sind verschieden.
+Binärdateien ../FrameworkOrig/Framework/main.o and Framework/main.o sind verschieden.
+diff -uNr ../FrameworkOrig/Framework/src/components/CAdminComponent.cpp Framework/src/components/CAdminComponent.cpp
+--- ../FrameworkOrig/Framework/src/components/CAdminComponent.cpp 2010-04-01 20:58:59.000000000 +0200
++++ Framework/src/components/CAdminComponent.cpp 2010-04-12 10:27:37.000000000 +0200
+@@ -107,9 +107,19 @@
+ CMessage msg(CMessage::Key_Event_Type);
+ msg.setSenderID(ADMIN_INDEX);
+ msg.setReceiverID(HMI_INDEX);
+- msg.setOpcode(TUNER_KEY); // z.B. anschalten
++ msg.setOpcode(TUNER_KEY);
+ CContext::getMDispContext().getNormalQueue().add(msg, false); // send out
+
++ sleep(1); // sleep 1 (3??) second
++ DEBUG_PRINT("====================================================================");
++ DEBUG_PRINT("Sending custom message");
++ CMessage customMsg(CMessage::Internal_App_Type);
++ customMsg.setSenderID(ADMIN_INDEX); // sender: AdminComponent
++ customMsg.setReceiverID(HMI_INDEX); // recv: HMI
++ CContext::getMDispContext().getInternalQueue().add(customMsg, false); // send out: put message in internal queue of Main Dispatch Thread (process)
++ DEBUG_PRINT("custom message is out");
++ DEBUG_PRINT("====================================================================");
++
+ /*
+ * zyklisch (3x) Dummy -Events an alle weiteren Komponenten versenden
+ */
+diff -uNr ../FrameworkOrig/Framework/src/components/CHmiComponent.cpp Framework/src/components/CHmiComponent.cpp
+--- ../FrameworkOrig/Framework/src/components/CHmiComponent.cpp 2010-04-01 19:23:12.000000000 +0200
++++ Framework/src/components/CHmiComponent.cpp 2010-04-12 10:31:04.000000000 +0200
+@@ -39,6 +39,11 @@
+ handleKeyEvent(msg);
+ break;
+ }
++ case CMessage::Internal_App_Type:
++ {
++ handleInternalMessage(msg);
++ break;
++ }
+ default:
+ {
+ DEBUG_PRINT(" no match found ");
+@@ -78,3 +83,7 @@
+ break;
+ }
+ }
++
++void CHmiComponent::handleInternalMessage(const CMessage& msg) {
++ DEBUG_PRINT("handling internal message");
++}
+diff -uNr ../FrameworkOrig/Framework/src/components/CHmiComponent.h Framework/src/components/CHmiComponent.h
+--- ../FrameworkOrig/Framework/src/components/CHmiComponent.h 2010-04-01 21:00:27.000000000 +0200
++++ Framework/src/components/CHmiComponent.h 2010-04-12 10:27:07.000000000 +0200
+@@ -106,6 +106,7 @@
+ virtual void handleMessage(const CMessage& msg);
+
+ void handleKeyEvent(const CMessage& msg); // opcode, param
++ void handleInternalMessage(const CMessage& msg); // handle internal messages
+
+ private:
+ CComponentContext& mContext;