AARCHMRS Schema 2.7.4

↚ Home

Accessors.Permission.FieldAccess object

The access property defines the logic governing accesses to a particular register field, for example:

A field has RO access inside a register that is RW.

Example

Assuming the field in question sits within a RW permissive register:

if boolean IMPLEMENTATION_DEFINED "Allow Field Writes" then
   RW
else
   RO

The FieldAccess can be written as:

{
   "_type": "Accessors.Permission.FieldAccess",
   "access": [
       {
           "_type": "Accessors.Permission.FieldAccess",
           "condition": "ImpDefBool(\"Allow Field Writes\"")
           "access": "RW"
       },
       {
           "_type": "Accessors.Permission.FieldAccess",
           "condition": null,
           "access": "RO"
       },
   ]
}

Note, a null condition defines the otherwise clause. When omitted the parent (register) permission applies.

Nesting

Field Accesses can be nested inside other Field Accesses to represent complex nested conditions.

object

Properties Type Description
_meta Meta

Metadata

See Meta for more information.
_type
Enum
Accessors.Permission.FieldAccess
access
oneOf [
array
]

The access which occurs when the condition is satisfied. This is effectively the contents of the if branch.

condition Traits.HasCondition

The condition under which the current access applies. This is effectively the if statement in the rendered pseudocode.

See definitions.condition in Traits.HasCondition for more information.
Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.

Schema http://json-schema.org/draft-04/schema#

{
  "info": [
    "The access property defines the logic governing accesses to a particular register field, for example:",
    "> A field has `RO` access inside a register that is `RW`.",
    "### Example",
    "Assuming the field in question sits within a RW permissive register:",
    [
      "```",
      "if boolean IMPLEMENTATION_DEFINED \"Allow Field Writes\" then",
      "   RW",
      "else",
      "   RO",
      "```"
    ],
    "The FieldAccess can be written as:",
    [
      "```",
      "{",
      "   \"_type\": \"Accessors.Permission.FieldAccess\",",
      "   \"access\": [",
      "       {",
      "           \"_type\": \"Accessors.Permission.FieldAccess\",",
      "           \"condition\": \"ImpDefBool(\\\"Allow Field Writes\\\"\")",
      "           \"access\": \"RW\"",
      "       },",
      "       {",
      "           \"_type\": \"Accessors.Permission.FieldAccess\",",
      "           \"condition\": null,",
      "           \"access\": \"RO\"",
      "       },",
      "   ]",
      "}",
      "```"
    ],
    "Note, a `null` condition defines the otherwise clause. When omitted the parent (register) permission applies.",
    "### Nesting",
    "Field Accesses can be nested inside other Field Accesses to represent complex nested conditions."
  ],
  "properties": {
    "_meta": {
      "$ref": "../../Meta.json",
      "info": [
        "Metadata"
      ]
    },
    "_type": {
      "enum": [
        "Accessors.Permission.FieldAccess"
      ]
    },
    "access": {
      "info": [
        "The access which occurs when the condition is satisfied. This is effectively the contents of the `if` branch."
      ],
      "oneOf": [
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "oneOf": [
              {
                "$ref": "#"
              },
              {
                "$ref": "FieldGetterSetter.json"
              }
            ]
          }
        },
        {
          "$ref": "FieldGetterSetter.json"
        },
        {
          "$ref": "AccessTypes/Field/ReadWriteAccess.json"
        },
        {
          "$ref": "AccessTypes/Field/ImplementationDefined.json"
        }
      ]
    },
    "condition": {
      "info": [
        "The condition under which the current access applies. This is effectively the `if` statement in the rendered pseudocode."
      ],
      "$ref": "../../Traits/HasCondition.json#/definitions/condition"
    }
  },
  "required": [
    "access"
  ],
  "title": "FieldAccess",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "additionalProperties": false
}