{
  "node": {
    "id": "block:data-store-write",
    "type": "Block",
    "label": "Storage writer",
    "properties": {
      "id": "data-store-write",
      "name": "Storage writer",
      "kind": "studio",
      "summary": "Writes a value for the next sample when its enable input is true.",
      "behavior": "The writer supplies a typed value and Boolean enable. Disabling writes retains the previous snapshot.",
      "ports": [
        {
          "name": "value",
          "direction": "input",
          "unit": "1",
          "description": "counter; real signal.",
          "shape": [],
          "elementType": "real"
        },
        {
          "name": "enabled",
          "direction": "input",
          "unit": "1",
          "description": "Write enabled; bool signal.",
          "shape": [],
          "elementType": "bool"
        }
      ],
      "parameters": [
        {
          "key": "store",
          "label": "Local storage name",
          "unit": "1",
          "default": "counter",
          "description": "Explicit store used by this worked model."
        }
      ],
      "equations": [
        "next snapshot = input if enabled; previous snapshot otherwise"
      ],
      "example": {
        "title": "Read and update local sampled storage",
        "text": "Increment = 1. Stored-value at 0.2 s = 2.",
        "url": "https://design.lemonergy.com/cosim.html?example=routing-local-storage",
        "label": "Open Studio example",
        "inputs": [
          {
            "port": "Increment",
            "label": "Increment",
            "value": 1,
            "unit": "1"
          }
        ],
        "checks": [
          {
            "port": "Stored-value",
            "label": "Stored-value",
            "atS": 0.2,
            "value": 2,
            "unit": "1",
            "tolerance": 1e-09
          }
        ]
      },
      "limits": [
        "At most one writer is allowed per local declaration. Combine competing write decisions explicitly before this port."
      ],
      "references": [],
      "referenceNote": "This software operation is defined by its public contract and worked example; no external research result is claimed.",
      "caseIds": [
        "native-data-store-write"
      ],
      "availability": {
        "status": "released",
        "label": "Available in Lemonergy Studio",
        "detail": "The bundled example is available in the production release verified on 28 October 2026. The parameters and examples here are synthetic teaching fixtures, not a characterized cell or a validated operating limit."
      },
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "type": "data-store-write",
      "implementationId": "data-store-write",
      "url": "https://lemonergy.com/learn/glossary/blocks/data-store-write/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/data-store-write/",
      "sourceFile": "block-library.json",
      "reviewed": "2026-10-27",
      "releaseEvidence": {
        "environment": "production",
        "status": "verified",
        "revision": "e76cadfc203e15eb41f3478d8b1044a5b851953d",
        "verifiedOn": "2026-10-28",
        "exampleUrls": [
          "https://design.lemonergy.com/cosim.html?example=routing-local-storage"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-data-store-write/0",
      "type": "usesBlock",
      "source": "workflow:native-data-store-write",
      "target": "block:data-store-write",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Storage writer",
        "type": "data-store-write",
        "role": "The writer supplies a typed value and Boolean enable. Disabling writes retains the previous snapshot.",
        "settings": [
          "Use the block reference for settings and connections.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [],
  "neighbors": [
    {
      "id": "workflow:native-data-store-write",
      "type": "Workflow",
      "label": "Read and update local sampled storage",
      "properties": {
        "id": "native-data-store-write",
        "title": "Read and update local sampled storage",
        "kind": "studio",
        "summary": "Writes a value for the next sample when its enable input is true.",
        "steps": [
          "Review the interface, units and model limits.",
          "Open the Studio example and run its bundled model.",
          "Compare outputs with the numerical checks; change one input and run again."
        ],
        "example": "Increment = 1. Stored-value at 0.2 s = 2.",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "At most one writer is allowed per local declaration. Combine competing write decisions explicitly before this port.",
        "url": "https://design.lemonergy.com/cosim.html?example=routing-local-storage",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    }
  ]
}
