{
	"toppers":{
		"VisualizeRules":{
			"taskStateChange":{
				"DisplayName":"状態遷移",
				"Target":"Task",
				"Shapes":{
					"stateChangeEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"             :"runningShapes",
						    "${FROM_VAL}==RUNNABLE"            :"runnableShapes",
						    "${FROM_VAL}==WAITING"             :[
						        "waitingShapes",
						        {"${TO_VAL}==RUNNABLE"  :"waitingToRunnableShapes"}
						    ],
						    "${FROM_VAL}==SUSPENDED"           :"suspendShapes",
						    "${FROM_VAL}==WAITING-SUSPENDED"   :"waitingSuspendedShapes",
						    "${FROM_VAL}==DORMANT"             :[
								"dormantShapes",
						        {"${TO_VAL}==RUNNABLE"  :"dormantToRunnableShapes"}
							]
						}
					},
					"activateHappenEvent":{
						"DisplayName":"起動",
						"When":"${TARGET}.activate()",
						"Figures":"activateShapes"
					},
					"exitHappenEvent":{
						"DisplayName":"終了",
						"When":"${TARGET}.exit()",
						"Figures":"exitShapes"
					},
					"terminateHappenEvent":{
						"DisplayName":"強制終了",
						"When":"${TARGET}.terminate()",
						"Figures":"terminateShapes"
					}
				}
			},
			"callSvc":{
				"DisplayName":"システムコール",
				"Target":"Task",
				"Shapes":{
					"callSvcEvent":{
						"DisplayName":"システムコール",
						"From":"${TARGET}.enterSVC()",
						"To":"${TARGET}.leaveSVC(${FROM_ARG0})",
						"Figures":[
						    {"${FROM_ARG0}==slp_tsk||${FROM_ARG0}==dly_tsk":"svcShapes(ff0000,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"},
						    {"${FROM_ARG0}!=slp_tsk&&${FROM_ARG0}!=dly_tsk":"svcShapes(ffff00,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"}
						]
					}
		        	}
			},
			"systemStatus":{
				"DisplayName":"システム状態",
				"Target":"Task",
				"Shapes":{
					"CpuLockState":{
						"DisplayName":"CPUロック状態",
						"From":"Task.enterSVC(loc_cpu)",
						"To":"${FROM_TARGET}.leaveSVC(unl_cpu)",
						"Figures":[
						    "cpulockShapes(ff0000)"
						]
					},
                    "DispatchDisableState":{
						"DisplayName":"ディスパッチ禁止状態",
						"From":"Task.enterSVC(dis_dsp)",
						"To":"${FROM_TARGET}.leaveSVC(ena_dsp)",
						"Figures":[
						    "disdspShapes(00ff00)"
						]
					},
                    "IntteruptDisableState":{
						"DisplayName":"割り込み禁止状態",
						"From":"Task.enterSVC(dis_int)",
						"To":"${FROM_TARGET}.leaveSVC(ena_int)",
						"Figures":[
						    "disintShapes(0000ff)"
						]
					}
				}
	    	},
			"interruptStateChange":{
				"DisplayName":"状態遷移",
				"Target":"InterruptHandler",
				"Shapes":{
					"callInterruptEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"	:"handlerRunningShapes",
						    "${FROM_VAL}==DORMANT"      :"handlerDormantShapes"
						}
					}
	        	}
			},
			"interruptserviceroutineStateChange":{
				"DisplayName":"状態遷移",
				"Target":"InterruptServiceRoutine",
				"Shapes":{
					"callInterruptServiceRoutineEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"	:"handlerRunningShapes",
						    "${FROM_VAL}==DORMANT"      :"handlerDormantShapes"
						}
					}
		        	}
			},
			"cyclicStateChange":{
				"DisplayName":"状態遷移",
				"Target":"CyclicHandler",
				"Shapes":{
					"callCyclicEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"	:"handlerRunningShapes",
						    "${FROM_VAL}==DORMANT"      :"handlerDormantShapes"
						}
					}
		        	}
			},
			"alarmStateChange":{
				"DisplayName":"状態遷移",
				"Target":"AlarmHandler",
				"Shapes":{
					"callAlarmEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"	:"handlerRunningShapes",
						    "${FROM_VAL}==DORMANT"      :"handlerDormantShapes"
						}
					}
		        	}
			},
			"cpuexceptionStateChange":{
				"DisplayName":"状態遷移",
				"Target":"CPUExceptionHandler",
				"Shapes":{
					"callCPUExceptionEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"	:"handlerRunningShapes",
						    "${FROM_VAL}==DORMANT"      :"handlerDormantShapes"
						}
					}
		        	}
			},
			"taskexceptionStateChange":{
				"DisplayName":"状態遷移",
				"Target":"TaskExceptionRoutine",
				"Shapes":{
					"callTaskExceptionEvent":{
						"DisplayName":"状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
						    "${FROM_VAL}==RUNNING"	:"handlerRunningShapes",
						    "${FROM_VAL}==DORMANT"      :"handlerDormantShapes"
						}
					}
		        	}
			},
			"interruptSVCcall":{
				"DisplayName":"システムコール",
				"Target":"InterruptHandler",
				"Shapes":{
					"callSvcEvent":{
						"DisplayName":"システムコール",
						"From":"${TARGET}.enterSVC()",
						"To":"${TARGET}.leaveSVC(${FROM_ARG0})",
						"Figures":[
						    {"${FROM_ARG0}==slp_tsk||${FROM_ARG0}==dly_tsk"
							:"svcShapes(ff0000,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"},
						    {"${FROM_ARG0}!=slp_tsk&&${FROM_ARG0}!=dly_tsk"
							:"svcShapes(ffff00,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"}
						]
					}
				}
			},
			"cyclicSVCcall":{
				"DisplayName":"システムコール",
				"Target":"CyclicHandler",
				"Shapes":{
					"callSvcEvent":{
						"DisplayName":"システムコール",
						"From":"${TARGET}.enterSVC()",
						"To":"${TARGET}.leaveSVC(${FROM_ARG0})",
						"Figures":[
						    {"${FROM_ARG0}==slp_tsk||${FROM_ARG0}==dly_tsk"
							:"svcShapes(ff0000,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"},
						    {"${FROM_ARG0}!=slp_tsk&&${FROM_ARG0}!=dly_tsk"
							:"svcShapes(ffff00,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"}
						]
					}
				}
			},
			"alarmSVCcall":{
				"DisplayName":"システムコール",
				"Target":"AlarmHandler",
				"Shapes":{
					"callSvcEvent":{
						"DisplayName":"システムコール",
						"From":"${TARGET}.enterSVC()",
						"To":"${TARGET}.leaveSVC(${FROM_ARG0})",
						"Figures":[
						    {"${FROM_ARG0}==slp_tsk||${FROM_ARG0}==dly_tsk"
							:"svcShapes(ff0000,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"},
						    {"${FROM_ARG0}!=slp_tsk&&${FROM_ARG0}!=dly_tsk"
							:"svcShapes(ffff00,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"}
						]
					}
				}
			},
			"cpuexceptionSVCcall":{
				"DisplayName":"システムコール",
				"Target":"CPUExceptionHandler",
				"Shapes":{
					"callSvcEvent":{
						"DisplayName":"システムコール",
						"From":"${TARGET}.enterSVC()",
						"To":"${TARGET}.leaveSVC(${FROM_ARG0})",
						"Figures":[
						    {"${FROM_ARG0}==slp_tsk||${FROM_ARG0}==dly_tsk"
							:"svcShapes(ff0000,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"},
						    {"${FROM_ARG0}!=slp_tsk&&${FROM_ARG0}!=dly_tsk"
							:"svcShapes(ffff00,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"}
						]
					}
				}
			},
			"taskexceptionSVCcall":{
				"DisplayName":"システムコール",
				"Target":"TaskExceptionRoutine",
				"Shapes":{
					"callSvcEvent":{
						"DisplayName":"システムコール",
						"From":"${TARGET}.enterSVC()",
						"To":"${TARGET}.leaveSVC(${FROM_ARG0})",
						"Figures":[
						    {"${FROM_ARG0}==slp_tsk||${FROM_ARG0}==dly_tsk"
							:"svcShapes(ff0000,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"},
						    {"${FROM_ARG0}!=slp_tsk&&${FROM_ARG0}!=dly_tsk"
							:"svcShapes(ffff00,${FROM_ARG0}(${FROM_ARG1}),${TO_ARG1})"}
						]
					}
				}
			},
			"applogString":{
				"DisplayName":"アプリログ（文字列）",
				"Target":"ApplogString",
				"Shapes":{
					"strLog":{
						"DisplayName":"文字列",
						"When":"${TARGET}.str",
						"Figures":"applogStringShapes(${VAL})"
					}
				}
			},
			"applogStringTask":{
				"DisplayName":"アプリログ（文字列）",
				"Target":"Task",
				"Shapes":{
					"strLogTask":{
						"DisplayName":"タスク文字列",
						"When":"${TARGET}.applog_str",
						"Figures":"applogStringShapes(${VAL})"
					}
				}
			},
			"applogState":{
				"DisplayName":"アプリログ（状態）",
				"Target":"ApplogState",
				"Shapes":{
					"stateLog":{
						"DisplayName":"ユーザ定義状態",
						"From":"${TARGET}.state",
						"To":"${TARGET}.state",
						"Figures":{
							"${FROM_VAL}==0":
								"applogStateShapes(ff0000)",
							"${FROM_VAL}==1":
								"applogStateShapes(00ff00)",
							"${FROM_VAL}==2":
								"applogStateShapes(0000ff)",
							"${FROM_VAL}==3":
								"applogStateShapes(000000)",
							"${FROM_VAL}==4":
								"applogStateShapes(ffff00)",
							"${FROM_VAL}==5":
								"applogStateShapes(00ffff)",
							"${FROM_VAL}==6":
								"applogStateShapes(ff8000)",
							"${FROM_VAL}==7":
								"applogStateShapes(ff00ff)"
						}
					}
				}
			},
			"applogStateTask":{
				"DisplayName":"アプリログ（状態）",
				"Target":"Task",
				"Shapes":{
					"stateLogTask":{
						"DisplayName":"ユーザ定義状態",
						"From":"${TARGET}.applog_state",
						"To":"${TARGET}.applog_state",
						"Figures":{
							"${FROM_VAL}==0":
								"applogStateShapes(ff0000)",
							"${FROM_VAL}==1":
								"applogStateShapes(00ff00)",
							"${FROM_VAL}==2":
								"applogStateShapes(0000ff)",
							"${FROM_VAL}==3":
								"applogStateShapes(000000)",
							"${FROM_VAL}==4":
								"applogStateShapes(ffff00)",
							"${FROM_VAL}==5":
								"applogStateShapes(00ffff)",
							"${FROM_VAL}==6":
								"applogStateShapes(ff8000)",
							"${FROM_VAL}==7":
								"applogStateShapes(ff00ff)"
						}
					}
				}
			}
		}
	}
}
