-
Notifications
You must be signed in to change notification settings - Fork 274
The OS Object
The OS
object is used to parametrize Trampoline. The following attributes of the OS object are standard in the OIL language.
this attribute is an enum. Possible values are:
-
STANDARD
: the services are compiled with minimum error checking. Trampoline will be smaller. Should be use un deployment but not in test. Basically, object identifier are not checked before using them. -
EXTENDED
: the services are compiled with extended error checking.
this boolean attribute specifies if Trampoline is compiled with a call to the startup hook or not. If set to TRUE
, the application must provide the following function:
FUNC(void, OS_CODE) StartupHook(CONST(AppModeType, AUTOMATIC) appMode)
{
...
}
where the appMode
argument is the value given to the StartOS
service call.
this boolean attribute specifies if Trampoline is compiled with a call to the startup hook or not. If set to TRUE
, the application must provide the following function:
FUNC(void, OS_CODE) ShutdownHook(CONST(StatusType, AUTOMATIC) error)
{
...
}
where the error
argument is the value given to the ShutdownOS
service call.
When this boolean attribute is set to TRUE
, the OSErrorGetServiceId()
macro may be used to get the identifier of the current service being called. Usually the macro is used in the ErrorHook
(see below). Outside the ErrorHook
, OSErrorGetServiceId()
returns the identifier of the last service used. Before calling any service, the returned value is undefined.
When this boolean attribute is set to TRUE
, macros allowing to get the arguments of services are made available. Usually these macros are used in the ErrorHook
(see below). Outside the ErrorHook
these macros return the arguments of the last service used. Before calling any service, the returned values are undefined.