Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // FleetChoices contains all the fleet name values for the IoT use case FleetChoices = []string{ "East", "West", "North", "South", } )
Functions ¶
Types ¶
type DiagnosticsMeasurement ¶
type DiagnosticsMeasurement struct {
*common.SubsystemMeasurement
}
DiagnosticsMeasurement represents a diagnostics subset of measurements.
func NewDiagnosticsMeasurement ¶
func NewDiagnosticsMeasurement(start time.Time) *DiagnosticsMeasurement
NewDiagnosticsMeasurement creates a DiagnosticsMeasurement with start time.
func (*DiagnosticsMeasurement) ToPoint ¶
func (m *DiagnosticsMeasurement) ToPoint(p *data.Point)
ToPoint serializes DiagnosticsMeasurement to generate.Point.
type ReadingsMeasurement ¶
type ReadingsMeasurement struct {
*common.SubsystemMeasurement
}
ReadingsMeasurement represents a subset of truck measurement readings.
func NewReadingsMeasurement ¶
func NewReadingsMeasurement(start time.Time) *ReadingsMeasurement
NewReadingsMeasurement creates a new ReadingsMeasurement with start time.
func (*ReadingsMeasurement) ToPoint ¶
func (m *ReadingsMeasurement) ToPoint(p *data.Point)
ToPoint serializes ReadingsMeasurement to serialize.Point.
type Simulator ¶
type Simulator struct {
// contains filtered or unexported fields
}
Simulator is responsible for simulating entries for the IoT use case. It will run on batches of entries and apply the generated batch configuration which it gets from the config generator. That way it can introduce things like missing entries or batches, out of order entries or batches etc.
func (*Simulator) Headers ¶
func (s *Simulator) Headers() *common.GeneratedDataHeaders
func (*Simulator) Next ¶
Next populates the serialize.Point with the next entry from the batch. If the current pregenerated batch is empty, it tries to generate a new one in order to populate the next entry.
type SimulatorConfig ¶
type SimulatorConfig common.BaseSimulatorConfig
SimulatorConfig is used to create an IoT Simulator. It fulfills the common.SimulatorConfig interface.
func (*SimulatorConfig) NewSimulator ¶
NewSimulator produces an IoT Simulator with the given config over the specified interval and points limit.
type Truck ¶
type Truck struct {
// contains filtered or unexported fields
}
Truck models a truck outfitted with an IoT device which sends back measurements.
func (Truck) Measurements ¶
func (t Truck) Measurements() []common.SimulatedMeasurement
Measurements returns the trucks measurements.