The access property defines the logic governing accesses to a particular register field, for example:
A field has
ROaccess inside a register that isRW.
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.
Field Accesses can be nested inside other Field Accesses to represent complex nested conditions.
| Properties | Type | Description |
|---|---|---|
| _meta | Meta |
Metadata
See
Meta
for more information.
|
| _type |
|
|
| access◊ |
oneOf [
array
]
|
The access which occurs when the condition is satisfied. This is effectively the contents of the
oneOf array
oneOf FieldGetterSetter
|
| condition | Traits.HasCondition |
The condition under which the current access applies. This is effectively the
See
definitions.condition in
Traits.HasCondition
for more information.
|
|
||
|
||
{
"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
}