Struct HeaderData
Decodes payload for LogMessages
Inherited Members
Namespace: Unity.Logging
Syntax
[BurstCompile]
public readonly struct HeaderData
Fields
ContextBufferCount
Payload handles that are context buffers
Declaration
public readonly int ContextBufferCount
Field Value
Type | Description |
---|---|
Int32 |
DecorationBufferCount
Payload handles that are decoration buffers
Declaration
public readonly ushort DecorationBufferCount
Field Value
Type | Description |
---|---|
UInt16 |
Error
Error code that was detected during the parsing of the binary data
Declaration
public readonly ErrorCodes Error
Field Value
Type | Description |
---|---|
Unity.Logging.Internal.Debug.ErrorCodes |
MessageBufferLength
Message buffer length in bytes
Declaration
public readonly int MessageBufferLength
Field Value
Type | Description |
---|---|
Int32 |
MessageBufferPointer
Pointer to message buffer UTF8 string
Declaration
public readonly byte *MessageBufferPointer
Field Value
Type | Description |
---|---|
Byte* |
Payloads
Payload handles attached to the LogMessage
Declaration
public readonly PayloadHandle*Payloads
Field Value
Type | Description |
---|---|
PayloadHandle* |
PayloadsCount
Count of payload handles attached to the LogMessage
Declaration
public readonly int PayloadsCount
Field Value
Type | Description |
---|---|
Int32 |
Properties
ContextStartIndex
Index of payload handle that is context buffer
Declaration
public readonly int ContextStartIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |
DecorationPairs
Number of payload handles that are decoration pairs
Declaration
public readonly ushort DecorationPairs { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Methods
Parse(in LogMessage, ref LogMemoryManager)
Parses Header of the binary data
Declaration
public static HeaderData Parse(in LogMessage messageData, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
LogMessage | messageData | LogMessage that owns the binary data |
LogMemoryManager | memAllocator | Memory manager that has the binary data |
Returns
Type | Description |
---|---|
HeaderData | Parsed HeaderData |
TryGetContextPayload(Int32, out PayloadHandle)
Try to get the PayloadHandle for the context payload by index
Declaration
public readonly bool TryGetContextPayload(int contextIndex, out PayloadHandle payloadHandle)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contextIndex | Index of the context payload |
PayloadHandle | payloadHandle | Resulting PayloadHandle, or default if not found |
Returns
Type | Description |
---|---|
Boolean | True if the context payload was found |
TryGetDecorationPayload(Int32, ref LogMemoryManager, out NativeArray<Byte>, out PayloadHandle)
Try to get the PayloadHandle for the decoration payload by the pair index
Declaration
public readonly bool TryGetDecorationPayload(int decorationPairIndex, ref LogMemoryManager memAllocator, out NativeArray<byte> nameArray, out PayloadHandle dataHandle)
Parameters
Type | Name | Description |
---|---|---|
Int32 | decorationPairIndex | Pair index |
LogMemoryManager | memAllocator | Memory manager that has the binary data |
NativeArray<Byte> | nameArray | Result - name of the decoration |
PayloadHandle | dataHandle | Result - data of the decoration |
Returns
Type | Description |
---|---|
Boolean | True if the decoration payload was found |