createSmpHeader

fun createSmpHeader(messageCounter: Int, eventTimestamp: SmpTimestamp, version: Int = 1, ackFlag: Boolean = false): SmpHeader

Creates an SMP header for this content.

This method generates an appropriate header for the content, including protocol version, content type, sequence number, and timestamp information.

Return

A new SmpHeader configured for this content.

Parameters

messageCounter

The sequence number for this message.

eventTimestamp

The timestamp when the message event occurred.

version

The protocol version number, defaults to 1.

ackFlag

Whether acknowledgment is required for this content, which affects the version byte.