blob: 4ddee43061aa110c8b677f40339cb4c5f9a89191 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Syncbase data model for Sensor Log.
//
// Every type <T> stored in Syncbase is defined as a pair of types, K<T> and
// V<T>, representing data stored in the key and value, respectively, in a
// single table. K<T> types satisfy the PersistentDataKey interface, supporting
// conversion to and from the row key.
package sbmodel
// devicecfg : <DevId>
// Measuring device handle. Master only.
type VDeviceCfg struct {
// Human-readable, not necessarily unique description of the device.
Desc string
// Syncbase instance publishing the syncgroup created by the device.
SgPublishSb string
}
type KDeviceCfg struct {
DevId string
}
// streamdef : <DevId>/<StreamId>
// Configures a stream of data to be measured.
// TODO(ivanpi): Add actual sampling script and parameters.
type VStreamDef struct {
// Human-readable, not necessarily unique description of the stream.
Desc string
// Flag to start and stop sampling.
Enabled bool
}
type KStreamDef struct {
DevId string
StreamId string
}