Method BuildMessage
BuildMessage(string, ref LogMemoryManager)
Helper function to pack string into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage(string message, ref LogMemoryManager memAllocator)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Input message |
| LogMemoryManager | memAllocator | Memory manager |
Returns
| Type | Description |
|---|---|
| PayloadHandle | Handle for the created data |
BuildMessage<T>(in T, ref LogMemoryManager)
Helper function to pack generic T into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage<T>(in T message, ref LogMemoryManager memAllocator) where T : IUTF8Bytes, INativeList<byte>
Parameters
| Type | Name | Description |
|---|---|---|
| T | message | Input message |
| LogMemoryManager | memAllocator | Memory manager |
Returns
| Type | Description |
|---|---|
| PayloadHandle | Handle for the created data |
Type Parameters
| Name | Description |
|---|---|
| T | IUTF8Bytes, INativeList of byte |
BuildMessage(NativeTextBurstWrapper, ref LogMemoryManager)
Writes UTF8 string into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage(NativeTextBurstWrapper msg, ref LogMemoryManager memAllocator)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeTextBurstWrapper | msg | NativeTextBurstWrapper nativeText wrapper that has UTF8 string |
| LogMemoryManager | memAllocator | Memory allocator that should allocate the PayloadHandle and store the UTF8 string data |
Returns
| Type | Description |
|---|---|
| PayloadHandle | PayloadHandle that contains the copied UTF8 string's data |
BuildMessage(IntPtr, int, ref LogMemoryManager)
Writes UTF8 string into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage(IntPtr utf8Ptr, int utf8Length, ref LogMemoryManager memAllocator)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | utf8Ptr | IntPtr pointer to UTF8 string data |
| int | utf8Length | Length of UTF8 string data |
| LogMemoryManager | memAllocator | Memory allocator that should allocate the PayloadHandle and store the UTF8 string data |
Returns
| Type | Description |
|---|---|
| PayloadHandle | PayloadHandle that contains the copied UTF8 string's data |
BuildMessage(byte*, int, ref LogMemoryManager)
Writes UTF8 string into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage(byte* utf8Ptr, int utf8Length, ref LogMemoryManager memAllocator)
Parameters
| Type | Name | Description |
|---|---|---|
| byte* | utf8Ptr | Pointer to UTF8 string data |
| int | utf8Length | Length of UTF8 string data |
| LogMemoryManager | memAllocator | Memory allocator that should allocate the PayloadHandle and store the UTF8 string data |
Returns
| Type | Description |
|---|---|
| PayloadHandle | PayloadHandle that contains the copied UTF8 string's data |