The type of group function to create (e.g., Request, Command, Acknowledge, ReadFields, etc.).
The PGN object containing the definition and field values.
Optional
fields: anyOptional additional fields to include in the message.
Optional
dst: numberOptional destination address for the message.
An instance of the corresponding NMEA 2000 group function PGN message.
Creates an instance of a NMEA 2000 group function PGN message based on the specified group function type, PGN definition, and optional destination address.
This utility function maps the provided group function to the appropriate PGN message constructor, populating its parameters and values from the PGN's field definitions.