9 | | {{{#!comment |
10 | | [執筆開始時削除エリア]ここから |
11 | | ※コメントごと削除してください |
12 | | }}} |
13 | | * '''本項目は、まだ執筆されていません''' |
14 | | * '''執筆して頂ける方は、本注意書きを削除の上、執筆をお願いします(詳しくは本Wikiのソースコードをご参照ください)''' |
15 | | * '''質問事項等がございましたら、[http://dev.toppers.jp/trac/ap/wiki/ Wikiトップページ]にあります[http://dev.toppers.jp/trac/ap/wiki/WikiStart#%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B%E5%85%88 問い合わせ先]までお願いします''' |
| 9 | |
| 10 | = 概要 = |
| 11 | * AUTOSARプラットフォームにおけるリアルタイムOS |
| 12 | * 主にタスクスケジューリング、割込み管理などを行う |
| 13 | * MCAL層が無いため、マイコンに依存した実装が伴う |
| 14 | * [http://ja.wikipedia.org/wiki/OSEK OSEK/VDX]仕様OSの上位互換とされ、OSEK仕様書に記載されている内容については、AUTOSAR仕様書には記載されていない |
| 15 | * OSEK仕様書もAUTOSAR同様、Webで[http://www.osek-vdx.org/ 公開]されている |
| 16 | * OSEK仕様とAUTOSAR仕様で若干の矛盾等も存在する |
| 17 | * コンフィギュレーション方法は、AUTOSAR準拠のXML方式に統合される |
| 18 | * OSの機能セット毎に、4つのスケーラビリティクラスが規定されている |
| 19 | * スケーラビリティクラス1(SC1) |
| 20 | * 基本セット |
| 21 | * スケーラビリティクラス2(SC2) |
| 22 | * 基本セット + タイミング保護 |
| 23 | * スケーラビリティクラス3(SC3) |
| 24 | * 基本セット + メモリ保護 |
| 25 | * スケーラビリティクラス4(SC4) |
| 26 | * 基本セット + タイミング保護 + メモリ保護 |
| 27 | * すべてのSCをマルチコアに拡張可能である |
| 28 | * API一覧 |
| 29 | |
| 30 | ||= OSEK仕様API =||= ID[[BR]][Dec] =||= ID[[BR]][Hex] =|| ||= AUTOSAR仕様API =||= ID[[BR]][Dec] =||= ID[[BR]][Hex] =|| |
| 31 | || [#ActivateTask ActivateTask] || || -- || || [#GetApplicationID GetApplicationID] || 0|| 0x00|| |
| 32 | || [#TerminateTask TerminateTask] || || -- || || [#GetISRID GetISRID] || 1|| 0x01|| |
| 33 | || [#ChainTask ChainTask] || || -- || || [#CallTrustedFunction CallTrustedFunction] || 2|| 0x02|| |
| 34 | || [#Schedule Schedule] || || -- || || [#CheckISRMemoryAccess CheckISRMemoryAccess] || 3|| 0x03|| |
| 35 | || [#GetTaskID GetTaskID] || || -- || || [#CheckTaskMemoryAccess CheckTaskMemoryAccess] || 4|| 0x04|| |
| 36 | || [#GetTaskState GetTaskState] || || -- || || [#CheckObjectAccess CheckObjectAccess] || 5|| 0x05|| |
| 37 | || [#EnableAllInterrupts EnableAllInterrupts] || || -- || || [#CheckObjectOwnership CheckObjectOwnership] || 6|| 0x06|| |
| 38 | || [#DisableAllInterrupts DisableAllInterrupts] || || -- || || [#StartScheduleTableRel StartScheduleTableRel] || 7|| 0x07|| |
| 39 | || [#ResumeAllInterrupts ResumeAllInterrupts] || || -- || || [#StartScheduleTableAbs StartScheduleTableAbs] || 8|| 0x08|| |
| 40 | || [#SuspendAllInterrupts SuspendAllInterrupts] || || -- || || [#StopScheduleTable StopScheduleTable] || 9|| 0x09|| |
| 41 | || [#ResumeOSInterrupts ResumeOSInterrupts] || || -- || || [#NextScheduleTable NextScheduleTable] || 10|| 0x0A|| |
| 42 | || [#SuspendOSInterrupts SuspendOSInterrupts] || || -- || || [#StartScheduleTableSynchron StartScheduleTableSynchron] || 11|| 0x0B|| |
| 43 | || [#GetResource GetResource] || || -- || || [#SyncScheduleTable SyncScheduleTable] || 12|| 0x0C|| |
| 44 | || [#ReleaseResource ReleaseResource] || || -- || || [#SetScheduletableAsync SetScheduletableAsync] || 13|| 0x0D|| |
| 45 | || [#SetEvent SetEvent] || || -- || || [#GetScheduleTableStatus GetScheduleTableStatus] || 14|| 0x0E|| |
| 46 | || [#ClearEvent ClearEvent] || || -- || || [#IncrementCounter IncrementCounter] || 15|| 0x0F|| |
| 47 | || [#GetEvent GetEvent] || || -- || || [#GetCounterValue GetCounterValue] || 16|| 0x10|| |
| 48 | || [#WaitEvent WaitEvent] || || -- || || [#GetElapsedValue GetElapsedValue] || 17|| 0x11|| |
| 49 | || [#GetAlarmBase GetAlarmBase] || || -- || || [#TerminateApplication TerminateApplication] || 18|| 0x12|| |
| 50 | || [#GetAlarm GetAlarm] || || -- || || [#AllowAccess AllowAccess] || 19|| 0x13|| |
| 51 | || [#SetRelAlarm SetRelAlarm] || || -- || || [#GetApplicationState GetApplicationState] || 20|| 0x14|| |
| 52 | || [#SetAbsAlarm SetAbsAlarm] || || -- || || [#GetNumberOfActivatedCores GetNumberOfActivatedCores] || 21|| 0x15|| |
| 53 | || [#CancelAlarm CancelAlarm] || || -- || || [#GetCoreID GetCoreID] || 22|| 0x16|| |
| 54 | || [#GetActiveApplicationMode GetActiveApplicationMode] || || -- || || [#StartCore StartCore] || 23|| 0x17|| |
| 55 | || [#StartOS StartOS] || || -- || || [#StartNonAutosarCore StartNonAutosarCore] || 24|| 0x18|| |
| 56 | || [#ShutdownOS ShutdownOS] || || -- || || [#GetSpinlock GetSpinlock] || 25|| 0x19|| |
| 57 | || || || || || [#ReleaseSpinlock ReleaseSpinlock] || 26|| 0x1A|| |
| 58 | || || || || || [#TryToGetSpinlock TryToGetSpinlock] || 27|| 0x1B|| |
| 59 | || || || || || [#ShutdownAllCores ShutdownAllCores] || 28|| 0x1C|| |
| 60 | || || || || || [#IocSend IocSend] || 30|| 0x1E|| |
| 61 | || || || || || [#IocWrite IocWrite] || 31|| 0x1F|| |
| 62 | || || || || || [#IocSendGroup IocSendGroup] || 32|| 0x20|| |
| 63 | || || || || || [#IocWriteGroup IocWriteGroup] || 33|| 0x21|| |
| 64 | || || || || || [#IocReceive IocReceive] || 34|| 0x22|| |
| 65 | || || || || || [#IocRead IocRead] || 35|| 0x23|| |
| 66 | || || || || || [#IocReceiveGroup IocReceiveGroup] || 36|| 0x24|| |
| 67 | || || || || || [#IocReadGroup IocReadGroup] || 37|| 0x25|| |
| 68 | || || || || || [#IocEmptyQueue IocEmptyQueue] || 38|| 0x26|| |
| 69 | |
17 | | {{{#!comment |
18 | | [執筆開始時削除エリア]ここまで |
19 | | ※コメントごと削除してください |
20 | | }}} |
21 | | |
22 | | = 概要 = |
| 71 | |
| 72 | = API仕様(OSEK) = |
| 73 | == !ActivateTask == |
| 74 | {{{ |
| 75 | StatusType ActivateTask(TaskType TaskID) |
| 76 | }}} |
| 77 | |
| 78 | == !TerminateTask == |
| 79 | {{{ |
| 80 | StatusType TerminateTask(void) |
| 81 | }}} |
| 82 | |
| 83 | == !ChainTask == |
| 84 | {{{ |
| 85 | StatusType ChainTask(TaskType TaskID) |
| 86 | }}} |
| 87 | |
| 88 | == Schedule == |
| 89 | {{{ |
| 90 | StatusType Schedule(void) |
| 91 | }}} |
| 92 | |
| 93 | == GetTaskID == |
| 94 | {{{ |
| 95 | StatusType GetTaskID(TaskRefType TaskID) |
| 96 | }}} |
| 97 | |
| 98 | == !GetTaskState == |
| 99 | {{{ |
| 100 | StatusType GetTaskState(TaskType TaskID, TaskStateRefType State) |
| 101 | }}} |
| 102 | |
| 103 | == !EnableAllInterrupts == |
| 104 | {{{ |
| 105 | void EnableAllInterrupts(void) |
| 106 | }}} |
| 107 | |
| 108 | == !DisableAllInterrupts == |
| 109 | {{{ |
| 110 | void DisableAllInterrupts(void) |
| 111 | }}} |
| 112 | |
| 113 | == !ResumeAllInterrupts == |
| 114 | {{{ |
| 115 | void ResumeAllInterrupts(void) |
| 116 | }}} |
| 117 | |
| 118 | == !SuspendAllInterrupts == |
| 119 | {{{ |
| 120 | void SuspendAllInterrupts(void) |
| 121 | }}} |
| 122 | |
| 123 | == ResumeOSInterrupts == |
| 124 | {{{ |
| 125 | void ResumeOSInterrupts(void) |
| 126 | }}} |
| 127 | |
| 128 | == SuspendOSInterrupts == |
| 129 | {{{ |
| 130 | void SuspendOSInterrupts(void) |
| 131 | }}} |
| 132 | |
| 133 | == !GetResource == |
| 134 | {{{ |
| 135 | StatusType GetResource(ResourceType ResID) |
| 136 | }}} |
| 137 | |
| 138 | == !ReleaseResource == |
| 139 | {{{ |
| 140 | StatusType ReleaseResource(ResourceType ResID) |
| 141 | }}} |
| 142 | |
| 143 | == !SetEvent == |
| 144 | {{{ |
| 145 | StatusType SetEvent(TaskType TaskID, EventMaskType Mask) |
| 146 | }}} |
| 147 | |
| 148 | == !ClearEvent == |
| 149 | {{{ |
| 150 | StatusType ClearEvent(EventMaskType Mask) |
| 151 | }}} |
| 152 | |
| 153 | == !GetEvent == |
| 154 | {{{ |
| 155 | StatusType GetEvent(TaskType TaskID, EventMaskRefType Event) |
| 156 | }}} |
| 157 | |
| 158 | == !WaitEvent == |
| 159 | {{{ |
| 160 | StatusType WaitEvent(EventMaskType Mask) |
| 161 | }}} |
| 162 | |
| 163 | == !GetAlarmBase == |
| 164 | {{{ |
| 165 | StatusType GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info) |
| 166 | }}} |
| 167 | |
| 168 | == !GetAlarm == |
| 169 | {{{ |
| 170 | StatusType GetAlarm(AlarmType AlarmID, TickRefType Tick) |
| 171 | }}} |
| 172 | |
| 173 | == !SetRelAlarm == |
| 174 | {{{ |
| 175 | StatusType SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle) |
| 176 | }}} |
| 177 | |
| 178 | == !SetAbsAlarm == |
| 179 | {{{ |
| 180 | StatusType SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle) |
| 181 | }}} |
| 182 | |
| 183 | == !CancelAlarm == |
| 184 | {{{ |
| 185 | StatusType CancelAlarm(AlarmType AlarmID) |
| 186 | }}} |
| 187 | |
| 188 | == !GetActiveApplicationMode == |
| 189 | {{{ |
| 190 | AppModeType GetActiveApplicationMode(void) |
| 191 | }}} |
| 192 | |
| 193 | == StartOS == |
| 194 | {{{ |
| 195 | void StartOS(AppModeType Mode) |
| 196 | }}} |
| 197 | |
| 198 | == ShutdownOS == |
| 199 | {{{ |
| 200 | void ShutdownOS(StatusType Error) |
| 201 | }}} |
26 | | = API仕様 = |
| 205 | = API仕様(AUTOSAR) = |
| 206 | |
| 207 | == GetApplicationID == |
| 208 | {{{ |
| 209 | ApplicationType GetApplicationID(void) |
| 210 | }}} |
| 211 | |
| 212 | == GetISRID == |
| 213 | {{{ |
| 214 | ISRType GetISRID(void) |
| 215 | }}} |
| 216 | |
| 217 | == !CallTrustedFunction == |
| 218 | {{{ |
| 219 | StatusType CallTrustedFunction(TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams) |
| 220 | }}} |
| 221 | |
| 222 | == CheckISRMemoryAccess == |
| 223 | {{{ |
| 224 | AccessType CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size) |
| 225 | }}} |
| 226 | |
| 227 | == !CheckTaskMemoryAccess == |
| 228 | {{{ |
| 229 | AccessType CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size) |
| 230 | }}} |
| 231 | |
| 232 | == !CheckObjectAccess == |
| 233 | {{{ |
| 234 | ObjectAccessType CheckObjectAccess(ApplicationType ApplID, ObjectTypeType ObjectType, void ...) |
| 235 | }}} |
| 236 | |
| 237 | == !CheckObjectOwnership == |
| 238 | {{{ |
| 239 | ApplicationType CheckObjectOwnership(ObjectTypeType ObjectType, void ...) |
| 240 | }}} |
| 241 | |
| 242 | == !StartScheduleTableRel == |
| 243 | {{{ |
| 244 | StatusType StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset) |
| 245 | }}} |
| 246 | |
| 247 | == !StartScheduleTableAbs == |
| 248 | {{{ |
| 249 | StatusType StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start) |
| 250 | }}} |
| 251 | |
| 252 | == !StopScheduleTable == |
| 253 | {{{ |
| 254 | StatusType StopScheduleTable(ScheduleTableType ScheduleTableID) |
| 255 | }}} |
| 256 | |
| 257 | == !NextScheduleTable == |
| 258 | {{{ |
| 259 | StatusType NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To) |
| 260 | }}} |
| 261 | |
| 262 | == !StartScheduleTableSynchron == |
| 263 | {{{ |
| 264 | StatusType StartScheduleTableSynchron(ScheduleTableType ScheduleTableID) |
| 265 | }}} |
| 266 | |
| 267 | == !SyncScheduleTable == |
| 268 | {{{ |
| 269 | StatusType SyncScheduleTable(ScheduleTableType ScheduleTableID, TickType Value) |
| 270 | }}} |
| 271 | |
| 272 | == !SetScheduletableAsync == |
| 273 | {{{ |
| 274 | StatusType SetScheduletableAsync(ScheduleTableType ScheduleTableID) |
| 275 | }}} |
| 276 | |
| 277 | == !GetScheduleTableStatus == |
| 278 | {{{ |
| 279 | StatusType GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus) |
| 280 | }}} |
| 281 | |
| 282 | == !IncrementCounter == |
| 283 | {{{ |
| 284 | StatusType IncrementCounter(CounterType CounterID) |
| 285 | }}} |
| 286 | |
| 287 | == !GetCounterValue == |
| 288 | {{{ |
| 289 | StatusType GetCounterValue(CounterType CounterID, TickRefType Value) |
| 290 | }}} |
| 291 | |
| 292 | == !GetElapsedValue == |
| 293 | {{{ |
| 294 | StatusType GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue) |
| 295 | }}} |
| 296 | |
| 297 | == !TerminateApplication == |
| 298 | {{{ |
| 299 | StatusType TerminateApplication(ApplicationType Application, RestartType RestartOption) |
| 300 | }}} |
| 301 | |
| 302 | == !AllowAccess == |
| 303 | {{{ |
| 304 | StatusType AllowAccess(void) |
| 305 | }}} |
| 306 | |
| 307 | == !GetApplicationState == |
| 308 | {{{ |
| 309 | StatusType GetApplicationState(ApplicationType Application, ApplicationStateRefType Value) |
| 310 | }}} |
| 311 | |
| 312 | == !GetNumberOfActivatedCores == |
| 313 | {{{ |
| 314 | uint32 GetNumberOfActivatedCores(void) |
| 315 | }}} |
| 316 | |
| 317 | == GetCoreID == |
| 318 | {{{ |
| 319 | CoreIdType GetCoreID(void) |
| 320 | }}} |
| 321 | |
| 322 | == !StartCore == |
| 323 | {{{ |
| 324 | void StartCore(CoreIdType CoreID, StatusType* Status) |
| 325 | }}} |
| 326 | |
| 327 | == !StartNonAutosarCore == |
| 328 | {{{ |
| 329 | void StartNonAutosarCore(CoreIdType CoreID, StatusType* Status) |
| 330 | }}} |
| 331 | |
| 332 | == !GetSpinlock == |
| 333 | {{{ |
| 334 | StatusType GetSpinlock(SpinlockIdType SpinlockId) |
| 335 | }}} |
| 336 | |
| 337 | == !ReleaseSpinlock == |
| 338 | {{{ |
| 339 | StatusType ReleaseSpinlock(SpinlockIdType SpinlockId) |
| 340 | }}} |
| 341 | |
| 342 | == !TryToGetSpinlock == |
| 343 | {{{ |
| 344 | StatusType TryToGetSpinlock(SpinlockIdType SpinlockId, TryToGetSpinlockType* Success) |
| 345 | }}} |
| 346 | |
| 347 | == !ShutdownAllCores == |
| 348 | {{{ |
| 349 | void ShutdownAllCores(StatusType Error) |
| 350 | }}} |
| 351 | |
| 352 | == !IocSend == |
| 353 | {{{ |
| 354 | Std_ReturnType IocSend_<IocId>[_<SenderId>](<Data> IN) |
| 355 | }}} |
| 356 | |
| 357 | == !IocWrite == |
| 358 | {{{ |
| 359 | Std_ReturnType IocWrite_<IocId>[_<SenderId>](<Data> IN) |
| 360 | }}} |
| 361 | |
| 362 | == !IocSendGroup == |
| 363 | {{{ |
| 364 | Std_ReturnType IocSendGroup_<IocId>(<Data1> IN1, <Data2> IN2, ...) |
| 365 | }}} |
| 366 | |
| 367 | == !IocWriteGroup == |
| 368 | {{{ |
| 369 | Std_ReturnType IocWriteGroup_<IocId>(<Data1> IN1, <Data2> IN2, ...) |
| 370 | }}} |
| 371 | |
| 372 | == !IocReceive == |
| 373 | {{{ |
| 374 | Std_ReturnType IocReceive_<IocId>(<Data> OUT) |
| 375 | }}} |
| 376 | |
| 377 | == !IocRead == |
| 378 | {{{ |
| 379 | Std_ReturnType IocRead_<IocId>(<Data> OUT) |
| 380 | }}} |
| 381 | |
| 382 | == !IocReceiveGroup == |
| 383 | {{{ |
| 384 | Std_ReturnType IocReceiveGroup_<IocId>(<Data1> OUT1, <Data2> OUT2, ...) |
| 385 | }}} |
| 386 | |
| 387 | == !IocReadGroup == |
| 388 | {{{ |
| 389 | Std_ReturnType IocReadGroup_<IocId>(<Data1> OUT1, <Data2> OUT2, ...) |
| 390 | }}} |
| 391 | |
| 392 | == !IocEmptyQueue == |
| 393 | {{{ |
| 394 | Std_ReturnType IocEmptyQueue_<IocId>(void) |
| 395 | }}} |