...
Record Nodes represent records in the file. Record Nodes can be specified as target nodes, which will generate output records of the File Collector (see 4).
Record Nodes are made up of a collection of nodes, of various types. The Attribute Nodes under a Record Node generate the File Columns in the output records of the File Collector.
In addition to common attributes (see 3.1) Record Record Nodes may have the following attributes:
Attribute name | Description | Possible Values | Mandatory | Default |
prefix | If the Record Node has a child Name Node (see 3.4.5), 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 | If a record has a child Tag Node (see 3.4.3) , then this string will be used as the discriminator for the Tag Node, unless a discriminator is also set on the Tag Node itself, which will override it. See 3.4.2 Attribute Node for details of the discriminator attribute. | 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 | F |
length | This overall length, as number of bytes, expected for all Attribute Nodes within the hierarchy of the Record Node. This is helpful if the fields that make up the record in the file include optional fields – setting the length helps the grammar to determine where the record ends. | Any of:
| No | None |
...
An Attribute Node (and each of its five subtypes: Tag Nodes; Length Nodes; Name Nodes; Value Nodes; Bytes Nodes) are the only grammar nodes that will make the file reader read bytes from the file.
An Attribute Node may have child nodes. For example, ASN.1 files have fields which consist of a tag value, followed by a length value, followed by the actual value of the field. This can be expressed in a grammar by placing child Tag, Length and Value (or Bytes) Nodes inside the Attribute Node.
If an Attribute Node has a child Value or Bytes Node then it will not itself read any data from the file, but will instead take its value from the Value or Bytes Node. In this case the bytes, bits, type, stringType, byteOrder and nibbleOrder attributes on the Attribute Node will merely act as defaults for the child Value or Bytes Node (although these defaults can be overridden by the child node if any of these attributes are set on the child node itself).
In addition to common attributes (see 3.1) Attribute Attribute Nodes may have the following attributes:
Attribute name | Description | Possible Values | Mandatory | Default |
prefix | If the Attribute Node has a child Name Node (see 3.4.5), 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. | 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. | T for true or F for false | No | F |
...