User Tools

Site Tools


Sidebar

Translations of this page:

====== Menu ====== ===== Introductions ===== * [[concept]] * [[about]] * [[laws]] * [[license]] ===== Documents ===== * [[tutorials/index.html]] * [[specifications/index.html]] * [[api_guides/index.html]] * [[faq/index.html]] * [[https://github.com/plenprojectcompany|Resources on the GitHub]] ===== Social Accounts ===== * [[https://ja-jp.facebook.com/PlenProjectCommittee|Facebook Page]] * [[https://twitter.com/plen_project|Twitter]] * [[https://www.instagram.com/plenproject/|Instagram]] * [[https://www.youtube.com/channel/UCoKNQe4Vb5Fa0D00bYLEFJQ|Youtube Channel]] ===== Etc ===== * [[sitepolicy]] * [[editing]] * [[https://www.dokuwiki.org/wiki:syntax|Syntax]]

specifications:motion_structure

This is an old revision of the document!


Motion Structure

JSON schema of PLEN's motion structure is shown as below.

{
    "description": "Structure of a motion",
    "type": "object",
    "properties": {
        "slot": {
            "description": "Index that the motion is placed",
            "type": "integer",
            "minimum": 0,
            "maximum": 89
        },
        "name": {
            "description": "Name of the motion",
            "type": "string",
            "minLength": 0,
            "maxLength": 20
        },
        "@frame_length": {
            "description": "Length of the frames",
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "optional": true
        },
        "codes": {
            "description": "Array of code",
            "type": "array",
            "items": {
                "description": "Structure of a code",
                "type": "object",
                "properties": {
                    "method": {
                        "description": "Method name you would like to call",
                        "type": "string"
                    },
                    "arguments": {
                        "description": "Arguments of the method",
                        "type": "array",
                        "items": {
                            "type": "any"
                        }
                    }
                }
            }
        },
        "frames": {
            "description": "Array of frame",
            "type": "array",
            "minItems": 1,
            "maxItems": 20,
            "items": {
                "description": "Structure of a frame",
                "type": "object",
                "properties": {
                    "@index": {
                        "description": "Index of the frame",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 19,
                        "optional": true
                    },
                    "transition_time_ms": {
                        "description": "Time of transition to the frame",
                        "type": "integer",
                        "minimum": 32,
                        "maximum": 65535
                    },
                    "stop_flag": {
                        "description": "To select using stop flag or not (Working Draft)",
                        "type": "boolean",
                        "optional": true
                    },
                    "auto_balance": {
                        "description": "To select using auto balancer or not (Working Draft)",
                        "type": "boolean",
                        "optional": true
                    },
                    "outputs": {
                        "description": "Array of output",
                        "type": "array",
                        "items": {
                            "description": "Structure of a output",
                            "type": "object",
                            "properties": {
                                "device": {
                                    "description": "Name of the output device",
                                    "type": "string"
                                },
                                "value": {
                                    "description": "Value of the output",
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
specifications/motion_structure.1481340753.txt.gz · Last modified: 2021/04/01 13:50 (external edit)