...
Attribute name | Description | Possible Values | Mandatory | Default |
prefix | If the Attribute Node has a child Name Node, setting this attribute will apply the value of the attribute, followed by an underscore, as a prefix to the name read from the file into the Name Node. This can be useful if the value read can start with a number, or other value which would be invalid when used in a PhixFlow Attribute Expression. | Any string | No | None |
discriminator | The discriminator specifies the full value of this field (i.e. the field represented by this Attribute Node) in the file. The discriminator will be converted, according to the type attribute, into the bytes that will be read in the file when this field is found. The discriminator can be used to determine whether optional fields are included in the file. | Any:
| No | None |
hexDiscriminator | Whether the discriminator will be given as a hex string. If the discriminator cannot be specified as an ASCII string then it can be specified as a hex string, where each pair of characters in the string represent a hex digit. | T for true or F for false | No | None |
bytes | The number of bytes to be read from the file for this field. | Any of:
| No, in certain cases (see notes in Possible Values column) Otherwise yes. | None |
bits | The number of bits to be read from the file. This value will take precedence over the number of bytes if both are specified. | Any of:
| No, in certain cases (see notes in Possible Values column) Otherwise yes. | None |
type | The type of the field to be read. This attribute dictates how the bytes read from the file will be converted. | Any of:
| No if this node has a child Value or Bytes Node, with the attribute type set. Otherwise yes. | None |
dateFormat | The format of a date in the file. This should only be set if the type has been set as Date or DateTime. If no date format is specified then the reader will try a variety of possible date formats in turn. It is therefore more efficient to specify a date format, if possible. | A valid date format string. Valid date formats are documented in the PhixFlow online help. | No | None |
stringType | This character set to use when converting the bytes read from the file into a string, or converting a discriminator value into the bytes that will be read in the file. | Any string which specifies a valid Java character set. E.g. UTF8 | No | Taken from Grammar Node |
byteOrder | The order that bytes will be read from the file when converting into a value. | L (for little endian) or B (for big endian). | No | Taken from Grammar Node |
nibbleOrder | The order that nibbles (4 bit blocks) will be read from the file when converting into a value. | L (for little endian) or B (for big endian). | No | Taken from Grammar Node |
tagType | If this grammar is for an ASN.1 file and this node is for a tag value – the type of tag. The ASN.1 definition document that describes the file using ASN.1 notation should specify the type of each tag. If not, see the notes at the end of the Tag Node description. This setting dictates how the tag value is translated. | Any of:
| No | Context |
berConstruct | If this grammar is for an ASN.1 file and this node is for a tag value - this flag indicates whether the tag is for a constructed value (i.e. a record with sub values) or a simple value. The ASN.1 definition document that describes the file using ASN.1 notation should specify whether this tag is for a construct variable. If not, see the notes at the end of the Tag Node description. | T for true or F for false | No | F |
...
- a Tag Node with type set to BERTag; follow the steps in ASN.1 Tag Encoding to determine the appropriate discriminator, tagType and berConstruct settings (this will result in the grammar above)
- a Tag Node with type set to Integer, discriminator set to a hex string (in the example, A5) and the hexDiscriminator set to T, as shown below:
...
If the bytes, bits, type, stringType, byteOrder and nibbleOrder attributes are not set on a Value Node then the corresponding attributes on the most immediate Attribute Node ancestor will apply. Just as for Tag Nodes inheriting discriminators, this is useful when creating reusable templates (see Tag Node). Rather than specifying these attributes in the template, they can be set on the Attribute Nodes that use the template. These attribute values will be inherited by the child nodes copied from the template. In this way the same template can be used for a range of Integer, String or BCD attributes with different byte, nibbleOrder, etc. attributes.
...