シナリオファイルの基本構成


基本構成
{
    "name" : "sample_scenario",
    "macros":[
        /* Macro定義 */
    ],
    "threads" : {
        /* threads定義 */
    },
    "scenario":[
        /* Scenario定義 */
    ]
}
    
Class : JNData
key type notes
name float シナリオ名
macros List<JNMacro> マクロ定義
threads Dictionary<string, List<JNCommandBundle>> スレッド定義
scenario List<JNCommandBundle> シナリオ定義(コマンドリスト)


Scenario定義


Scenario定義
    "scenario":[
        {
            /* Command Bundle Data */

            "label": "start",
            "isAuto": true,
            "autoDelay": 0.5,
            "commands": [
                {
                    /* Command Data */
                }
            ],

            "macro":null
        }
    ]
    
Class : JNCommandBundle
key type notes
label string CommandBundleLabel定義
isAuto bool Auto進行
autoDelay float Auto進行の遅延時間
commands List<JNCommand> 実行コマンド定義
macro JNMacroExecuteData 実行マクロの指定(指定する場合、commandsは無視される)
CommandBundleLabel定義


Command定義


Command定義
            "commands": [
                {
                    "label": "command_label",
                    "forceWait":true,
                    "type": "CommandType"

                    /* Parameters for each command */
                }
            ]
    
Class : JNCommand
key type notes
label string CommandLabel定義
forceWait bool コマンドの完了を待機する
type string コマンドの指定
CommandLabel定義
コマンド固有パラメータについて


Macro定義


Macro定義
    "macros":[
        {
            "id": "singleMacro",
            "macro": {
                "commands": [
                    /* Command Data */
                ]
            }
        },
        {
            "id": "multipleMacro",
            "macroBundle": [
                {
                    "commands": [
                        /* Command Data */
                    ]
                },
                {
                    /* macroを指定可能 */
                    "macro" : {
                        "id" : "singleMacro"
                    }
                }
            ]
        }
    ]
    
Class : JNMacro
key type notes
id string Macro ID
macro JNCommandBundle 実行コマンド
macroBundle List<JNCommandBundle> 実行コマンド群
macroとmacroBundleを合わせて定義した場合
マクロ実行元のJNCommandBundleのパラメータについて


Macro実行定義


Macro実行定義
    "macros":[
        {
            "id": "macro_1",
            "macro": {
                "commands": [
                    {
                        "label": "command_1",
                        "type": "CommandType",

                        /* Parameters for each command */
                        "position": { "x" : 0 }
                    }
                ]
            }
        }
    ],
    "scenario":[
        {
            "label": "label_1",
            "macro": {
                "id" : "macro_1",
                "overwrites": [
                    {
                        "commandLabel":"command_1",
                        "values": {
                            "position": { "x" : -250 }
                        }
                    }
               ]
            }
        }
    ]
    
Class : JNMacroExecuteData
key type notes
id string 実行マクロID
overwrites List<OverwiteData> 上書きパラメータ

Class : JNMacroExecuteData.OverwiteData
key type notes
commandLabel string ターゲットとなるコマンドのラベル
values Dictionary<string, object> 上書きするパラメータ定義


Thread定義


Thread定義
    "threads" : {
        "sample_thread" : [
            {
                "commands": [
                    /* Command Data */
                ]
            },
            {
                "commands": [
                    /* Command Data */
                ]
            },
            {
                "commands": [
                    /* Command Data */
                ]
            }
        ],
        "sample_thread_macro" : [
            {
                /* シナリオ定義と同様にマクロも使用できます */
                "macro" : {
                    "id" : "target_macro_id"
                }
            }
        ]
    }
    
key type notes
threads Dictionary<string, List<JNCommandBundle>> スレッド定義
スレッドの実行に関するコマンドはこちら