2 #ifndef APPLICATION_H_
\r
3 #define APPLICATION_H_
\r
5 #if ( OS_SC3 == STD_ON) || ( OS_SC4 == STD_ON )
\r
7 /* STD container : OsApplicationHooks
\r
9 * OsAppErrorHook: 1 Bool
\r
10 * OsAppShutdownHook: 1 Bool
\r
11 * OsAppStartupHook: 1 Bool
\r
14 typedef struct OsAppHooks {
\r
15 void (*startup)( void );
\r
16 void (*shutdown)( Std_ReturnType Error );
\r
17 void (*error)( Std_ReturnType Error );
\r
21 /* STD container : OsApplication
\r
23 * OsAppAlarmRef: 0..*
\r
24 * OsAppCounterRef: 0..*
\r
26 * OsAppResourceRef: 0..*
\r
27 * OsAppScheduleTableRef: 0..*
\r
28 * OsAppTaskRef: 0..*
\r
29 * OsRestartTask: 0..1 Ref to system restart task
\r
30 * OsApplicatinHooks[C] 1
\r
31 * OsApplictionTrustedFunction[C]: 0..*
\r
33 * Note! referenced objects also can be accessed by multiple applications.
\r
34 * Note! speed is needed when looking up the accessing application, not vice versa.
\r
35 * Note! The application knowledge about what objects belong to it is just a memory
\r
36 * management issue, not an access issue.
\r
39 typedef struct OsApplication {
\r
40 /* 0 - Non-trusted application
\r
41 * 1 - Trusted application */
\r
44 /* NOTE! Refs here is memory management issue */
\r
46 /* The application hooks */
\r
47 OsAppHooksType hooks;
\r
49 /* Trusted functions */
\r
51 } OsApplicationType;
\r
54 /* NON standard type.
\r
55 * Used for ROM based parameters.... TODO
57 typedef struct OsRomApplication {
\r
58 uint32 application_id;
\r
63 void (*StartupHook)( void );
\r
64 void (*ShutdownHook)( Std_ReturnType Error );
\r
65 void (*ErrorHook)( Std_ReturnType Error );
\r
68 uint32 scheduletable_mask;
\r
70 uint32 counter_mask;
\r
71 uint32 resource_mask;
\r
72 uint32 message_mask;
\r
74 } OsRomApplicationType;
\r
76 #endif /* ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON ) */
\r
79 #endif /* APPLICATION_H_ */
\r