Class DeviceFormatters.BinaryUnixSeconds

Namespace
ProtoTest.Devices
Assembly
ProtoTest.Devices.dll

A moment as a 32-bit unsigned count of seconds since 1970-01-01 UTC.

public sealed class DeviceFormatters.BinaryUnixSeconds : IDeviceBinaryFieldFormatter<DateTimeOffset>
Inheritance
DeviceFormatters.BinaryUnixSeconds
Implements
Inherited Members
Extension Methods

Properties

Size

Gets how many bytes the field takes.

public int Size { get; }

Property Value

int

Methods

Read(ReadOnlySpan<byte>, bool)

Reads the value from exactly Size bytes.

public DateTimeOffset Read(ReadOnlySpan<byte> source, bool bigEndian)

Parameters

source ReadOnlySpan<byte>
bigEndian bool

Returns

DateTimeOffset

Write(DateTimeOffset, Span<byte>, bool)

Writes the value into exactly Size bytes.

public void Write(DateTimeOffset value, Span<byte> destination, bool bigEndian)

Parameters

value DateTimeOffset
destination Span<byte>
bigEndian bool