Table of Contents

Class TimestampedFunctionLibrary

Namespace
NominalSystems.Messages
Assembly
NominalSystems.Classes.dll

This static function library is used for creating new timestamped messages of a particular type and is able to be used from Unreal.

public static class TimestampedFunctionLibrary
Inheritance
TimestampedFunctionLibrary

Methods

GetMessageFromTimestamped(object?)

Returns the message embedded within the timestamped payload as a value.

public static Message? GetMessageFromTimestamped(object? timed)

Parameters

timed object

The timestamped payload that needs to be unwrapped

Returns

Message

The message within the wrapper

GetMessageType(Type)

Returns the type of message from the timestamped type that exists within the payload.

public static Type? GetMessageType(Type type)

Parameters

type Type

The full timestamped type of the object to check against

Returns

Type

The correct message type that was wrapped

GetTimeFromTimestamped(object?)

Returns the timestamp in nano seconds from a timestamped object, if it exists.

public static ulong GetTimeFromTimestamped(object? timed)

Parameters

timed object

The timestamped payload that needs to be unwrapped

Returns

ulong

[ns] The timestamp in nano seconds

GetTimestampedType(Message)

Returns the timestamped payload type with a particular message embedded.

public static Type GetTimestampedType(Message msg)

Parameters

msg Message

The message to wrap the timestamped payload around

Returns

Type

The valid timestamped type

GetTimestampedType(Type)

Returns the timestamped payload type with a particular message embedded.

public static Type GetTimestampedType(Type type)

Parameters

type Type

The message type to wrap the timestamped payload around

Returns

Type

The valid timestamped type

IsObjectTimestamped(object)

Returns whether the object is a timestamped payload.

public static bool IsObjectTimestamped(object obj)

Parameters

obj object

The object to check

Returns

bool

A flag whether the message is timestamped

IsTypeTimestamped(Type)

Returns whether a particular type is a timestamped type. If this is true, it will return true.

public static bool IsTypeTimestamped(Type type)

Parameters

type Type

The type of the object to check against

Returns

bool

A flag whether the type is timestamped

JSONToMessage(string, ulong, NsDateTime?, string)

Converts some JSON data from the struct of the message, along with a date of some kind (either as a string, NsDateTime

public static object? JSONToMessage(string json, ulong unixNanos = 0, NsDateTime? dateTime = null, string dateStr = "")

Parameters

json string

[-] The raw JSON data from the message from the struct

unixNanos ulong

[ns] The nanoseconds since UNIX time [OPTIONAL]

dateTime NsDateTime

[-] A datetime to stamp the message [OPTIONAL]

dateStr string

[-] A full string that describes the date as YYYY/mm/dd HH:MM:SS

Returns

object

A timestamped message, if it is created properly.