| // 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. |
| |
| // slcli is the Sensor Log command line configuration tool and client. |
| // Must be run against master device Syncbase. |
| // Supports configuring sampling streams by writing configuration to Syncbase, |
| // which is then read by measured on the target device. |
| // Also supports listing measured data. |
| // TODO(ivanpi): Add data querying and graph plotting. |
| package main |
| |
| import ( |
| "flag" |
| "regexp" |
| |
| "v.io/x/lib/cmdline" |
| _ "v.io/x/ref/runtime/factories/roaming" |
| "v.io/x/sensorlog/internal/config" |
| ) |
| |
| var ( |
| flagSbService = flag.String("service", config.DefaultSbService, "Name of the Syncbase service to connect to. Can be absolute or relative to the namespace root.") |
| ) |
| |
| var cmdSensorLog = &cmdline.Command{ |
| Name: "slcli", |
| Short: "Sensor Log command line configuration tool and client", |
| Long: ` |
| Command line interface for Sensor Log, used for listing data and manipulating |
| configuration via a master device Syncbase. |
| `, |
| Children: []*cmdline.Command{cmdSLDevice, cmdSLStream, cmdSLList}, |
| } |
| |
| func main() { |
| cmdline.HideGlobalFlagsExcept(regexp.MustCompile(`^((service)|(v23\.namespace\.root)|(v23\.credentials))$`)) |
| cmdline.Main(cmdSensorLog) |
| } |