generateSerialNumber abstract method

int generateSerialNumber(
  1. String? msgType,
  2. DateTime? now
)

Generates a unique serial number (SN) for message content.

The SN serves as a unique message ID (uint64) to track and deduplicate messages.

msgType is the type of the message content (used for algorithm-specific generation). now is the timestamp to incorporate into the SN (or current time if null).

Returns a 64-bit unsigned integer (uint64) as the unique serial number.

Implementation

int generateSerialNumber(String? msgType, DateTime? now);