combinedsewageoverflow

package
v0.0.0-...-2fda283 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CombinedSewageOverflowFactory = func(id, tenant string) *CombinedSewageOverflow {
	return &CombinedSewageOverflow{
		ID:             id,
		Type:           "CombinedSewageOverflow",
		Tenant:         tenant,
		DateObserved:   time.Now().UTC(),
		CumulativeTime: 0,
	}
}

Functions

This section is empty.

Types

type CombinedSewageOverflow

type CombinedSewageOverflow struct {
	ID                     string        `json:"id"`
	Type                   string        `json:"type"`
	CumulativeTime         time.Duration `json:"cumulativeTime"`                   // total time for all overflows
	DateObserved           time.Time     `json:"dateObserved"`                     // last time
	Overflows              []Overflow    `json:"overflow"`                         // all detected overflows
	OverflowDetected       bool          `json:"overflowDetected"`                 // true if last handled message created/updated an overflow
	OverflowObserved       *time.Time    `json:"overflowObserved,omitempty"`       // time for last overflow observation
	State                  bool          `json:"state"`                            // current state
	StateChanged           bool          `json:"stateChanged"`                     // true if last handled message changed state
	Tenant                 string        `json:"tenant"`                           // tenant
	CombinedSewageOverflow *things.Thing `json:"combinedsewageoverflow,omitempty"` // related thing
}

func (CombinedSewageOverflow) Body

func (cso CombinedSewageOverflow) Body() []byte

func (CombinedSewageOverflow) ContentType

func (cso CombinedSewageOverflow) ContentType() string

func (*CombinedSewageOverflow) Handle

func (CombinedSewageOverflow) TopicName

func (cso CombinedSewageOverflow) TopicName() string

type Overflow

type Overflow struct {
	ID        string        `json:"id"`
	State     bool          `json:"state"`
	StartTime time.Time     `json:"startTime"`
	StopTime  *time.Time    `json:"stopTime"`
	Duration  time.Duration `json:"duration"`
}

Jump to

Keyboard shortcuts

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