libera_utils.packet_configs.TimeFieldMapping#

class libera_utils.packet_configs.TimeFieldMapping(day_field: str | None = None, s_field: str | None = None, ms_field: str | None = None, us_field: str | None = None)#

Bases: object

Mapping of time field names to their roles in multipart timestamp conversion.

This class defines which packet fields correspond to different time units (days, seconds, milliseconds, microseconds) and provides a property to generate the appropriate kwargs for the multipart_to_dt64 function.

Attributes:
day_field
ms_field
multipart_kwargs

Return kwargs dict for multipart_to_dt64 function.

s_field
us_field
__init__(day_field: str | None = None, s_field: str | None = None, ms_field: str | None = None, us_field: str | None = None) None#

Attributes

day_field

ms_field

multipart_kwargs

Return kwargs dict for multipart_to_dt64 function.

s_field

us_field

property multipart_kwargs: dict[str, str]#

Return kwargs dict for multipart_to_dt64 function.

Returns:

Dictionary with field parameter names as keys and field names as values, excluding any None values.

Return type:

dict[str, str]