{
    "general": {
      "name": {
        "default": "state configuration",
        "rules": {
          "type": "string",
          "description": "A human-readable name for the state configuration."
        }
      },
      "id": {
        "default": null,
        "rules": {
          "type": "string",
          "nullable": true,
          "description": "A unique identifier for this configuration, assigned dynamically when needed."
        }
      },
      "unit": {
        "default": "unitless",
        "rules": {
          "type": "string",
          "description": "The unit used for the state values (e.g., 'meters', 'seconds', 'unitless')."
        }
      },
      "logging": {
        "logLevel": {
            "default": "info",
            "rules": {
                "type": "enum",
                "values": [
                    {
                        "value": "debug",
                        "description": "Log messages are printed for debugging purposes."
                    },
                    {
                        "value": "info",
                        "description": "Informational messages are printed."
                    },
                    {
                        "value": "warn",
                        "description": "Warning messages are printed."
                    },
                    {
                        "value": "error",
                        "description": "Error messages are printed."
                    }
                ]
            }
        },
        "enabled": {
            "default": true,
            "rules": {
                "type": "boolean",
                "description": "Indicates whether logging is active. If true, log messages will be generated."
            }
        }
      }
    },
    "functionality": {
      "softwareType": {
        "default": "state class",
        "rules": {
          "type": "string",
          "description": "Logical name identifying the software type."
        }
      },
      "role": {
        "default": "statecontroller",
        "rules": {
          "type": "string",
          "description": "Functional role within the system."
        }
      }
    },
    "time": {
      "starting": {
        "default": 10,
        "rules": {
          "type": "number",
          "description": "Time in seconds for the starting phase."
        }
      },
      "warmingup": {
        "default": 5,
        "rules": {
          "type": "number",
          "description": "Time in seconds for the warming-up phase."
        }
      },
      "stopping": {
        "default": 5,
        "rules": {
          "type": "number",
          "description": "Time in seconds for the stopping phase."
        }
      },
      "coolingdown": {
        "default": 10,
        "rules": {
          "type": "number",
          "description": "Time in seconds for the cooling-down phase."
        }
      }
    },
    "movement": {
      "mode": {
        "default": "dynspeed",
        "rules": {
          "type": "enum",
          "values": [
            {
              "value": "staticspeed",
              "description": "Linear movement to setpoint."
            },
            {
              "value": "dynspeed",
              "description": "Ease-in and ease-out to setpoint."
            }
          ]
        }
      },
      "speed": {
        "default": 1,
        "rules": {
          "type": "number",
          "description": "Current speed setting."
        }
      },
      "maxSpeed": {
        "default": 1000,
        "rules": {
          "type": "number",
          "description": "Maximum speed setting."
        }
      },
      "interval": {
        "default": 1000,
        "rules": {
          "type": "number",
          "description": "Feedback interval in milliseconds."
        }
      }
    },
    "position": {
      "min": {
        "default": 0,
        "rules": {
          "type": "number",
          "description": "Minimum position value."
        }
      },
      "max": {
        "default": 100,
        "rules": {
          "type": "number",
          "description": "Maximum position value."
        }
      },
      "initial": {
        "default": 0,
        "rules": {
          "type": "number",
          "description": "Initial position value."
        }
      }
    },
    "state": {
      "current": {
        "default": "idle",
        "rules": {
          "type": "enum",
          "values": [
            {
              "value": "idle",
              "description": "Machine is idle."
            },
            {
              "value": "starting",
              "description": "Machine is starting up."
            },
            {
              "value": "warmingup",
              "description": "Machine is warming up."
            },
            {
              "value": "operational",
              "description": "Machine is running."
            },
            {
              "value": "accelerating",
              "description": "Machine is accelerating."
            },
            {
              "value": "decelerating",
              "description": "Machine is decelerating."
            },
            {
              "value": "stopping",
              "description": "Machine is stopping."
            },
            {
              "value": "coolingdown",
              "description": "Machine is cooling down."
            },
            {
              "value": "off",
              "description": "Machine is off."
            },
            {
              "value": "maintenance",
              "description": "Machine locked for inspection or repair; automatic control disabled."
            }
          ],
          "description": "Current state of the machine."
        }
      },
      "allowedTransitions":{
        "default": {},
        "rules": {
          "type": "object",
          "schema": {
            "idle": {
              "default": ["starting", "off","emergencystop","maintenance"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from idle state."
              }
            },
            "starting": {
              "default": ["starting","warmingup","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from starting state."
              }
            },
            "warmingup": {
              "default": ["operational","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from warmingup state."
              }
            },
            "operational": {
              "default": ["accelerating", "decelerating", "stopping","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from operational state."
              }
            },
            "accelerating": {
              "default": ["operational","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from accelerating state."
              }
            },
            "decelerating": {
              "default": ["operational","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from decelerating state."
              }
            },
            "stopping": {
              "default": ["idle","coolingdown","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from stopping state."
              }
            },
            "coolingdown": {
              "default": ["idle","off","emergencystop"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from coolingDown state."
              }
            },
            "off": {
              "default": ["idle","emergencystop","maintenance"],
              "rules":{
                "type": "set",
                "itemType": "string",
                "description": "Allowed transitions from off state."
              }
          },
          "emergencystop": {
            "default": ["idle","off","maintenance"],
            "rules":{
              "type": "set",
              "itemType": "string",
              "description": "Allowed transitions from emergency stop state."
            }
          },
          "maintenance":  { 
            "default": ["maintenance","idle","off"],
            "rules":{
              "type": "set",
              "itemType": "string",
              "description": "Allowed transitions for maintenance mode"
            }
          }
        },
        "description": "Allowed transitions between states."
        }
      },
      "activeStates":{ 
        "default": ["operational", "starting", "warmingup", "accelerating", "decelerating"],
        "rules": {
          "type": "set",
          "itemType": "string",
          "description": "Active states."
        }
      }
    },
    "mode": {
      "current": {
        "default": "auto",
        "rules": {
          "type": "enum",
          "values": [
            {
              "value": "auto",
              "description": "Automatically tracks and handles delayed commands for setpoints > 0."
            },
            {
              "value": "manual",
              "description": "Requires explicit commands to start."
            }
          ],
          "description": "Current mode of the machine."
        }
      }
      }
  }
  