wiki:spec/Os

Version 5 (modified by fujisft-shigihara, 10 years ago) ( diff )

--

OS


概要

  • AUTOSARプラットフォームにおけるリアルタイムOS
    • 主にタスクスケジューリング、割込み管理などを行う
    • MCAL層が無いため、マイコンに依存した実装が伴う
  • OSEK/VDX仕様OSの上位互換とされ、OSEK仕様書に記載されている内容については、AUTOSAR仕様書には記載されていない
    • OSEK仕様書もAUTOSAR同様、Webで公開されている
    • OSEK仕様とAUTOSAR仕様で若干の矛盾等も存在する
    • コンフィギュレーション方法は、AUTOSAR準拠のXML方式に統合される
  • OSの機能セット毎に、4つのスケーラビリティクラスが規定されている
    • スケーラビリティクラス1(SC1)
      • 基本セット
    • スケーラビリティクラス2(SC2)
      • 基本セット + タイミング保護
    • スケーラビリティクラス3(SC3)
      • 基本セット + メモリ保護
    • スケーラビリティクラス4(SC4)
      • 基本セット + タイミング保護 + メモリ保護
  • すべてのSCをマルチコアに拡張可能である
  • API一覧
OSEK仕様API ID
[Dec]
ID
[Hex]
AUTOSAR仕様API ID
[Dec]
ID
[Hex]
ActivateTask -- -- GetApplicationID 0 0x00
TerminateTask -- -- GetISRID 1 0x01
ChainTask -- -- CallTrustedFunction 2 0x02
Schedule -- -- CheckISRMemoryAccess 3 0x03
GetTaskID -- -- CheckTaskMemoryAccess 4 0x04
GetTaskState -- -- CheckObjectAccess 5 0x05
EnableAllInterrupts -- -- CheckObjectOwnership 6 0x06
DisableAllInterrupts -- -- StartScheduleTableRel 7 0x07
ResumeAllInterrupts -- -- StartScheduleTableAbs 8 0x08
SuspendAllInterrupts -- -- StopScheduleTable 9 0x09
ResumeOSInterrupts -- -- NextScheduleTable 10 0x0A
SuspendOSInterrupts -- -- StartScheduleTableSynchron 11 0x0B
GetResource -- -- SyncScheduleTable 12 0x0C
ReleaseResource -- -- SetScheduletableAsync 13 0x0D
SetEvent -- -- GetScheduleTableStatus 14 0x0E
ClearEvent -- -- IncrementCounter 15 0x0F
GetEvent -- -- GetCounterValue 16 0x10
WaitEvent -- -- GetElapsedValue 17 0x11
GetAlarmBase -- -- TerminateApplication 18 0x12
GetAlarm -- -- AllowAccess 19 0x13
SetRelAlarm -- -- GetApplicationState 20 0x14
SetAbsAlarm -- -- GetNumberOfActivatedCores 21 0x15
CancelAlarm -- -- GetCoreID 22 0x16
GetActiveApplicationMode -- -- StartCore 23 0x17
StartOS -- -- StartNonAutosarCore 24 0x18
ShutdownOS -- -- GetSpinlock 25 0x19
ReleaseSpinlock 26 0x1A
TryToGetSpinlock 27 0x1B
ShutdownAllCores 28 0x1C
IocSend 30 0x1E
IocWrite 31 0x1F
IocSendGroup 32 0x20
IocWriteGroup 33 0x21
IocReceive 34 0x22
IocRead 35 0x23
IocReceiveGroup 36 0x24
IocReadGroup 37 0x25
IocEmptyQueue 38 0x26

API仕様(OSEK)

ActivateTask

StatusType ActivateTask(TaskType TaskID)

TerminateTask

StatusType TerminateTask(void)

ChainTask

StatusType ChainTask(TaskType TaskID)

Schedule

StatusType Schedule(void)

GetTaskID

StatusType GetTaskID(TaskRefType TaskID)

GetTaskState

StatusType GetTaskState(TaskType TaskID, TaskStateRefType State)

EnableAllInterrupts

void EnableAllInterrupts(void)

DisableAllInterrupts

void DisableAllInterrupts(void)

ResumeAllInterrupts

void ResumeAllInterrupts(void)

SuspendAllInterrupts

void SuspendAllInterrupts(void)

ResumeOSInterrupts

void ResumeOSInterrupts(void)

SuspendOSInterrupts

void SuspendOSInterrupts(void)

GetResource

StatusType GetResource(ResourceType ResID)

ReleaseResource

StatusType ReleaseResource(ResourceType ResID)

SetEvent

StatusType SetEvent(TaskType TaskID, EventMaskType Mask)

ClearEvent

StatusType ClearEvent(EventMaskType Mask)

GetEvent

StatusType GetEvent(TaskType TaskID, EventMaskRefType Event)

WaitEvent

StatusType WaitEvent(EventMaskType Mask)

GetAlarmBase

StatusType GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info)

GetAlarm

StatusType GetAlarm(AlarmType AlarmID, TickRefType Tick)

SetRelAlarm

StatusType SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle)

SetAbsAlarm

StatusType SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle)

CancelAlarm

StatusType CancelAlarm(AlarmType AlarmID)

GetActiveApplicationMode

AppModeType GetActiveApplicationMode(void)

StartOS

void StartOS(AppModeType Mode)

ShutdownOS

void ShutdownOS(StatusType Error)

API仕様(AUTOSAR)

GetApplicationID

ApplicationType GetApplicationID(void)

GetISRID

ISRType GetISRID(void)

CallTrustedFunction

StatusType CallTrustedFunction(TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams)

CheckISRMemoryAccess

AccessType CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size)

CheckTaskMemoryAccess

AccessType CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size)

CheckObjectAccess

ObjectAccessType CheckObjectAccess(ApplicationType ApplID, ObjectTypeType ObjectType, void ...)

CheckObjectOwnership

ApplicationType CheckObjectOwnership(ObjectTypeType ObjectType, void ...)

StartScheduleTableRel

StatusType StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset)

StartScheduleTableAbs

StatusType StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start)

StopScheduleTable

StatusType StopScheduleTable(ScheduleTableType ScheduleTableID)

NextScheduleTable

StatusType NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To)

StartScheduleTableSynchron

StatusType StartScheduleTableSynchron(ScheduleTableType ScheduleTableID)

SyncScheduleTable

StatusType SyncScheduleTable(ScheduleTableType ScheduleTableID, TickType Value)

SetScheduletableAsync

StatusType SetScheduletableAsync(ScheduleTableType ScheduleTableID)

GetScheduleTableStatus

StatusType GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus)

IncrementCounter

StatusType IncrementCounter(CounterType CounterID)

GetCounterValue

StatusType GetCounterValue(CounterType CounterID, TickRefType Value)

GetElapsedValue

StatusType GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue)

TerminateApplication

StatusType TerminateApplication(ApplicationType Application, RestartType RestartOption)

AllowAccess

StatusType AllowAccess(void)

GetApplicationState

StatusType GetApplicationState(ApplicationType Application, ApplicationStateRefType Value)

GetNumberOfActivatedCores

uint32 GetNumberOfActivatedCores(void)

GetCoreID

CoreIdType GetCoreID(void)

StartCore

void StartCore(CoreIdType CoreID, StatusType* Status)

StartNonAutosarCore

void StartNonAutosarCore(CoreIdType CoreID, StatusType* Status)

GetSpinlock

StatusType GetSpinlock(SpinlockIdType SpinlockId)

ReleaseSpinlock

StatusType ReleaseSpinlock(SpinlockIdType SpinlockId)

TryToGetSpinlock

StatusType TryToGetSpinlock(SpinlockIdType SpinlockId, TryToGetSpinlockType* Success)

ShutdownAllCores

void ShutdownAllCores(StatusType Error)

IocSend

Std_ReturnType IocSend_<IocId>[_<SenderId>](<Data> IN)

IocWrite

Std_ReturnType IocWrite_<IocId>[_<SenderId>](<Data> IN)

IocSendGroup

Std_ReturnType IocSendGroup_<IocId>(<Data1> IN1, <Data2> IN2, ...)

IocWriteGroup

Std_ReturnType IocWriteGroup_<IocId>(<Data1> IN1, <Data2> IN2, ...)

IocReceive

Std_ReturnType IocReceive_<IocId>(<Data> OUT)

IocRead

Std_ReturnType IocRead_<IocId>(<Data> OUT)

IocReceiveGroup

Std_ReturnType IocReceiveGroup_<IocId>(<Data1> OUT1, <Data2> OUT2, ...)

IocReadGroup

Std_ReturnType IocReadGroup_<IocId>(<Data1> OUT1, <Data2> OUT2, ...)

IocEmptyQueue

Std_ReturnType IocEmptyQueue_<IocId>(void)

コンフィギュレーション仕様

Note: See TracWiki for help on using the wiki.