Documentation ¶
Index ¶
- type Channel
- type ChannelGroup
- type MF4
- func (m *MF4) CreatedBy() string
- func (m *MF4) DaylightOffsetMin(tFlag uint8) (int16, error)
- func (m *MF4) GetAttachments() []AT.AttFile
- func (m *MF4) GetChannelSample(indexDataGroup int, channelName string) ([]interface{}, error)
- func (m *MF4) GetMeasureComment() string
- func (m *MF4) GetStartTimeLT() time.Time
- func (m *MF4) GetStartTimeNs() int64
- func (m *MF4) GetTimeNs(t uint64, tzo uint64, dlo uint64, tf uint8) int64
- func (m *MF4) ID() string
- func (m *MF4) IsFinalized() bool
- func (m *MF4) ListAllChannels() []*Channel
- func (m *MF4) ListAllChannelsFromDataGroup(datagroupIndex int) []*Channel
- func (m *MF4) ListAllChannelsNames() []string
- func (m *MF4) ListEvents() []*EV.Event
- func (m *MF4) MapAllChannels() map[int]*Channel
- func (m *MF4) MapAllChannelsNames() map[int]string
- func (m *MF4) MdfVersion() uint16
- func (m *MF4) ReadChangeLog()
- func (m *MF4) SaveAttachmentTo(attachment AT.AttFile, outputPath string) AT.AttFile
- func (m *MF4) StartAngleRad() (float64, error)
- func (m *MF4) StartDistanceM() (float64, error)
- func (m *MF4) TimezoneOffsetMin(tzo int16, timeFlag uint8) (int16, error)
- func (m *MF4) Version() string
- type VersionError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { // channel's name Name string // conversion formula to convert the raw values to physical values with a // physical unit Conversion CC.Conversion // channel type Type string // pointer to the master channel of the channel group. // A 'nil' value indicates that this channel itself is the master. Master *Channel // pointer to data group DataGroup *DG.Block // data group's index DataGroupIndex int // pointer to channel group ChannelGroup *CG.Block // channel group's index ChannelGroupIndex int // describes the source of an acquisition mode or of a signal SourceInfo SI.SourceInfo // additional information about the channel. Can be 'nil' Comment string // contains filtered or unexported fields }
type ChannelGroup ¶
type MF4 ¶
type MF4 struct { File *os.File Header *HD.Block Identification *ID.Block //Address to First File History Block FileHistory int64 ChannelGroup []*ChannelGroup Channels []*Channel }
func (*MF4) DaylightOffsetMin ¶
Daylight saving time (DST) offset in minutes for the starting timestamp. During the summer months, many regions observe a DST offset of 60 minutes (1 hour).
func (*MF4) GetAttachments ¶
GetAttachmemts iterates over all AT blocks and return to an array
func (*MF4) GetChannelSample ¶
GetChannelSample loads sample based DataGroupName and ChannelName
func (*MF4) GetMeasureComment ¶
func (*MF4) GetStartTimeLT ¶
func (*MF4) GetStartTimeNs ¶
StartTimeNs returns the start timestamp of measurement in nanoseconds
func (*MF4) IsFinalized ¶
isUnfinalized method returns Standard flags for unfinalized MDF
func (*MF4) ListAllChannels ¶
ListAllChannelsNames returns an slice with all channels from the MF4 file
func (*MF4) ListAllChannelsFromDataGroup ¶
ListAllChannels returns an slice with all channels from the MF4 file
func (*MF4) ListAllChannelsNames ¶
ListAllChannels returns an slice with all channels from the MF4 file
func (*MF4) ListEvents ¶
loadEvents loads and processes events from the given MF4 instance. Events are represented by EVBLOCK structures, providing synchronization details. The function iterates through the linked list of events, creating EV instances and handling event details such as names, comments, and scopes. If file has no events or errors occur during EV instance creation, it will return `nil`
func (*MF4) MapAllChannels ¶
MapAllChannels returns an map with all channels from the MF4 file group by data group
func (*MF4) MapAllChannelsNames ¶
MapAllChannelsNames returns an map with all channels from the MF4 file group by data group
func (*MF4) MdfVersion ¶
VersionNumber method returns the Version number of the MDF format, i.e. 420
func (*MF4) ReadChangeLog ¶
func (m *MF4) ReadChangeLog()
ReadChangeLog reads and prints the change log entries from the MF4 file. The change log is stored in FHBLOCK structures, each representing a change made to the MDF file. The function iterates through the linked list of FHBLOCKs starting from the first one referenced by the HDBLOCK, printing the chronological change history.
Parameters:
m: A pointer to the MF4 instance containing the file change log.
func (*MF4) SaveAttachmentTo ¶
Saves attachment file input to output path
func (*MF4) StartAngleRad ¶
Start angle in radians at the beginning of the measurement serves as the reference point for angle synchronous measurements.
func (*MF4) StartDistanceM ¶
Start distance in meters in meters at the beginning of the measurement serves as the reference point for distance synchronous measurements.
func (*MF4) TimezoneOffsetMin ¶
Time zone offset in minutes. Range (-840, 840) minutes. For instance, a value of 60 minutes implies UTC+1 time zone, corresponding to Central European Time (CET).
type VersionError ¶
type VersionError struct { }
func (*VersionError) Error ¶
func (e *VersionError) Error() string