core

package
v0.0.0-...-505b8b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2020 License: Apache-2.0, EPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timestamp

type Timestamp = C.z_timestamp_t

Timestamp is a data structure representing a unique timestamp.

func GenerateTimestamp

func GenerateTimestamp() *Timestamp

GenerateTimestamp creates a new timestamp with current time but with 0x00 as clock_id. WARN: Don't use it, this is a temporary workaround. @TODO: remove this when we're sure Data always come with a Timestamp.

func (*Timestamp) Before

func (ts *Timestamp) Before(ots *Timestamp) bool

Before reports whether the Timestamp ts was created before ots. This function can be used for sorting.

func (*Timestamp) ClockID

func (ts *Timestamp) ClockID() [16]byte

ClockID returns the unique identifier of the clock that generated this timestamp.

func (*Timestamp) GoTime

func (ts *Timestamp) GoTime() time.Time

GoTime returns the time of a Timestamp as a Go time.Time

func (*Timestamp) Time

func (ts *Timestamp) Time() uint64

Time returns the time as a 64-bit long, where:

  • The higher 32-bit represent the number of seconds since midnight, January 1, 1970 UTC
  • The lower 32-bit represent a fraction of 1 second.

func (*Timestamp) ToString

func (ts *Timestamp) ToString() string

ToString returns the Timestamp as a string

type ZError

type ZError struct {
	Msg   string
	Code  int
	Cause error
}

ZError reports an error that occurred in zenoh.

func (*ZError) Error

func (e *ZError) Error() string

Error returns the message associated to a ZError

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL