Message
struct Message : Codable, Equatable
A struct embedded inside an EntityLog
struct that is used as a flattened representation of all data associated with each individual print number contained in an EntityLog
.
-
A string representing the entity code of the EntityLog containing the print number.
Note
The value of the property will be the same for all print numbers contained in an EntityLog but will be different from other messages merged into theMessageCollator
messages
dictionary.Declaration
Swift
var entityCode: String
-
An Int representing the custom function number of the function that contains the print number node.
Declaration
Swift
var functionNumber: Int
-
An Int representing the relative function number of the function that contains the print number with respect to the EntityLog.
The relative function number is the index number of the function as it is listed in the array keyed by
entity_functions
of the EntityLog JSON file.Function numbers are displayed as relative function numbers if the setting
calculateFunctionNumbersRelativeToEntity
is set to the bool value true.Note
The value returned from thefirstIndex(of:)->Self.Index?
used on thekB21A
(entity_functions
) array in the initialiser is unwrapped using the nil coalescing operator. If the value returned is nilfunctionNumberInEntity
is set to -1 and incremented by 1 to return 0 ( a result that should never occur). Otherwise the value is simply incremented by 1 (to offset the zero indexing of arrays) and return the entity function’s sequential position in the array.Declaration
Swift
var functionNumberInEntity: Int
-
A Bool representing whether the function number of the function that contains the print number is always displayed as the custom value set in the EntityLog JSON file.
This property is used to override the general setting
calculateFunctionNumbersRelativeToEntity
for the particular function number.Declaration
Swift
var functionNumberAlwaysCustom: Bool
-
An enum of type FunctionType representing the function type of the function that contains the print number.
Declaration
Swift
var functionType: FunctionType
-
An enum of type NodeType representing the node type of the node containing the print number.
Declaration
Swift
var nodeType: NodeType
-
An Int representing the relative node number of the node that contains the print number with respect to its function.
The relative node number is the index number of the node as it is listed in the array keyed by
function_nodes
of the EntityLog JSON file.Print numbers are displayed as relative node numbers if the setting
calculateNodeNumbersRelativeToFunction
is set to the bool value true.Note
The value returned from thefirstIndex(of:)->Self.Index?
used on thekD31A
(function_nodes
) array in the initialiser is unwrapped using the nil coalescing operator. If the value returned is nilnodeNumberWithinFunction
is set to -1 and incremented by 1 to return 0 ( a result that should never occur). Otherwise the value is simply incremented by 1 (to offset the zero indexing of arrays) and return the node’s sequential position in the array.Declaration
Swift
var nodeNumberWithinFunction: Int
-
A string representing the event description of the node containing the print number.
Declaration
Swift
var eventDescription: String
-
A string representing the effect description of the node containing the print number.
Declaration
Swift
var effectDescription: String