notecard

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 22 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NotecardInterfaceSerial = "serial"
	NotecardInterfaceI2C    = "i2c"
	NotecardInterfaceRemote = "remote"
)

Module communication interfaces

View Source
const CardI2CMax = 253

CardI2CMax controls chunk size that's socially appropriate on the I2C bus. It must be 1-253 bytes as per spec (which allows space for the 2-byte header in a 255-byte read)

View Source
const CardRequestI2CChunkDelayMs = 20

CardRequestI2CChunkDelayMs (golint)

View Source
const CardRequestI2CSegmentDelayMs = 250

CardRequestI2CSegmentDelayMs (golint)

View Source
const CardRequestI2CSegmentMaxLen = 250

CardRequestI2CSegmentMaxLen (golint)

View Source
const CardRequestSerialSegmentDelayMs = 250

CardRequestSerialSegmentDelayMs (golint)

View Source
const CardRequestSerialSegmentMaxLen = 250

CardRequestSerialSegmentMaxLen (golint)

View Source
const (
	// I2CSlave is the slave device address
	I2CSlave = 0x0703
)
View Source
const IoErrorIsRecoverable = true

IoErrorIsRecoverable is a configuration parameter describing library capabilities. Set this to true if the error recovery of the implementation supports re-open. On all implementations tested to date, I can't yet get the close/reopen working the way it does on microcontrollers. For example, on the go serial, I get a nil pointer dereference within the go library. This MAY have soemthing to do with the fact that we don't cleanly implement the shutdown/restart of the inputHandler in trace, in which case that should be fixed. In the meantime, this is disabled.

View Source
const ReqCardAUX = "card.aux"

ReqCardAUX (golint)

View Source
const ReqCardAttn = "card.attn"

ReqCardAttn (golint)

View Source
const ReqCardBootloader = "card.bootloader"

ReqCardBootloader (golint)

View Source
const ReqCardCarrier = "card.carrier"

ReqCardCarrier (golint)

View Source
const ReqCardCheckpoint = "card.checkpoint"

ReqCardCheckpoint (golint)

View Source
const ReqCardContact = "card.contact"

ReqCardContact (golint)

View Source
const ReqCardIO = "card.io"

ReqCardIO (golint)

View Source
const ReqCardLocation = "card.location"

ReqCardLocation (golint)

View Source
const ReqCardLocationMode = "card.location.mode"

ReqCardLocationMode (golint)

View Source
const ReqCardLocationTrack = "card.location.track"

ReqCardLocationTrack (golint)

View Source
const ReqCardLog = "card.log"

ReqCardLog (golint)

View Source
const ReqCardMonitor = "card.monitor"

ReqCardMonitor (golint)

View Source
const ReqCardMotion = "card.motion"

ReqCardMotion (golint)

View Source
const ReqCardMotionMode = "card.motion.mode"

ReqCardMotionMode (golint)

View Source
const ReqCardMotionSync = "card.motion.sync"

ReqCardMotionSync (golint)

View Source
const ReqCardMotionTrack = "card.motion.track"

ReqCardMotionTrack (golint)

View Source
const ReqCardReserve = "card.reserve"

ReqCardReserve (golint)

View Source
const ReqCardRestart = "card.restart"

ReqCardRestart (golint)

View Source
const ReqCardRestore = "card.restore"

ReqCardRestore (golint)

View Source
const ReqCardSetup = "card.setup"

ReqCardSetup (golint)

View Source
const ReqCardStatus = "card.status"

ReqCardStatus (golint)

View Source
const ReqCardTemp = "card.temp"

ReqCardTemp (golint)

View Source
const ReqCardTest = "card.test"

ReqCardTest (golint)

View Source
const ReqCardTime = "card.time"

ReqCardTime (golint)

View Source
const ReqCardTrace = "card.trace"

ReqCardTrace (golint)

View Source
const ReqCardTriangulate = "card.triangulate"

ReqCardTriangulate (golint)

View Source
const ReqCardUsageGet = "card.usage.get"

ReqCardUsageGet (golint)

View Source
const ReqCardUsageRate = "card.usage.rate"

ReqCardUsageRate (golint)

View Source
const ReqCardUsageTest = "card.usage.test"

ReqCardUsageTest (golint)

View Source
const ReqCardVoltage = "card.voltage"

ReqCardVoltage (golint)

View Source
const ReqCardWireless = "card.wireless"

ReqCardWireless (golint)

View Source
const ReqDFUGet = "dfu.get"

ReqDFUGet (golint)

View Source
const ReqDFUHubGet = "hub.dfu.get"

ReqDFUHubGet (golint)

View Source
const ReqDFUHubGetL = "dfu.service.get"

ReqDFUHubGetL (golint)

View Source
const ReqDFUStatus = "dfu.status"

ReqDFUStatus (golint)

View Source
const ReqEnvDefault = "env.default"

ReqEnvDefault (golint)

View Source
const ReqEnvGet = "env.get"

ReqEnvGet (golint)

View Source
const ReqEnvLocation = "env.location"

ReqEnvLocation (golint)

View Source
const ReqEnvModified = "env.modified"

ReqEnvModified (golint)

View Source
const ReqEnvSet = "env.set"

ReqEnvSet (golint)

View Source
const ReqEnvSync = "env.sync"

ReqEnvSync (golint)

View Source
const ReqEnvTime = "env.time"

ReqEnvTime (golint)

View Source
const ReqEnvVersion = "env.version"

ReqEnvVersion (golint)

View Source
const ReqEnvVersionL = "card.version"

ReqEnvVersionL (golint)

View Source
const ReqFileAdd = "file.add"

ReqFileAdd (golint)

View Source
const ReqFileChanges = "file.changes"

ReqFileChanges (golint)

View Source
const ReqFileChangesPending = "file.changes.pending"

ReqFileChangesPending (golint)

View Source
const ReqFileDelete = "file.delete"

ReqFileDelete (golint)

View Source
const ReqFileGetL = "file.get"

ReqFileGetL (golint)

View Source
const ReqFileSet = "file.set"

ReqFileSet (golint)

View Source
const ReqFileStats = "file.stats"

ReqFileStats (golint)

View Source
const ReqFileSync = "file.sync"

ReqFileSync (golint)

View Source
const ReqHubEnvL = "hub.env"

ReqHubEnvL (golint)

View Source
const ReqHubEnvLL = "service.env"

ReqHubEnvLL (golint)

View Source
const ReqHubGet = "hub.get"

ReqHubGet (golint)

View Source
const ReqHubGetL = "service.get"

ReqHubGetL (golint)

View Source
const ReqHubLog = "hub.log"

ReqHubLog (golint)

View Source
const ReqHubLogL = "service.log"

ReqHubLogL (golint)

View Source
const ReqHubSet = "hub.set"

ReqHubSet (golint)

View Source
const ReqHubSetL = "service.set"

ReqHubSetL (golint)

View Source
const ReqHubSignal = "hub.signal"

ReqHubSignal (golint)

View Source
const ReqHubSignalL = "service.signal"

ReqHubSignalL (golint)

View Source
const ReqHubStatus = "hub.status"

ReqHubStatus (golint)

View Source
const ReqHubStatusL = "service.status"

ReqHubStatusL (golint)

View Source
const ReqHubSync = "hub.sync"

ReqHubSync (golint)

View Source
const ReqHubSyncL = "service.sync"

ReqHubSyncL (golint)

View Source
const ReqHubSyncStatus = "hub.sync.status"

ReqHubSyncStatus (golint)

View Source
const ReqHubSyncStatusL = "service.sync.status"

ReqHubSyncStatusL (golint)

View Source
const ReqNoteAdd = "note.add"

ReqNoteAdd (golint)

View Source
const ReqNoteChanges = "note.changes"

ReqNoteChanges (golint)

View Source
const ReqNoteDelete = "note.delete"

ReqNoteDelete (golint)

View Source
const ReqNoteEvent = "note.event"

ReqNoteEvent (golint)

View Source
const ReqNoteGet = "note.get"

ReqNoteGet (golint)

View Source
const ReqNoteTemplate = "note.template"

ReqNoteTemplate (golint)

View Source
const ReqNoteUpdate = "note.update"

ReqNoteUpdate (golint)

View Source
const ReqNotesGetL = "notes.get"

ReqNotesGetL (golint)

View Source
const ReqWebGet = "web.get"

ReqWebGet (golint)

View Source
const ReqWebPost = "web.post"

ReqWebPost (golint)

View Source
const ReqWebPut = "web.put"

ReqWebPut (golint)

View Source
const SyncLogLevelAll = SyncLogLevelProg

SyncLogLevelAll is all events

View Source
const SyncLogLevelDetail = 2

SyncLogLevelDetail is major, minor, and detailed events

View Source
const SyncLogLevelMajor = 0

SyncLogLevelMajor is just major events

View Source
const SyncLogLevelMinor = 1

SyncLogLevelMinor is just major and minor events

View Source
const SyncLogLevelNone = -1

SyncLogLevelNone is no events

View Source
const SyncLogLevelProg = 3

SyncLogLevelProg is everything plus programmatically-targeted

View Source
const SyncLogNotefile = "_synclog.qi"

SyncLogNotefile is the special notefile containing sync log info

Variables

View Source
var InitialDebugMode = false

InitialDebugMode is the debug mode that the context is initialized with

Functions

func Defaults added in v1.1.16

func Defaults() (moduleInterface string, port string, portConfig int)

Defaults gets the default interface, port, and config

func I2CDefaults

func I2CDefaults() (port string, portConfig int)

I2CDefaults returns the default serial parameters

func I2CPorts

func I2CPorts() (allports []string, usbports []string, notecardports []string, err error)

I2CPorts returns the list of available I2C ports

func NewBody added in v1.1.5

func NewBody() (body map[string]interface{})

NewBody creates a new body. Note that this method is provided merely as syntactic sugar, as of the form body := note.NewBody()

func NewCommand added in v1.4.4

func NewCommand(reqType string) (req map[string]interface{})

NewCommand creates a new command that requires no response from the notecard.

func NewRequest added in v1.1.5

func NewRequest(reqType string) (req map[string]interface{})

NewRequest creates a new request that is guaranteed to get a response from the Notecard. Note that this method is provided merely as syntactic sugar, as of the form req := note.NewRequest("note.add")

func SerialDefaults

func SerialDefaults() (port string, portConfig int)

SerialDefaults returns the default serial parameters

func SerialPorts

func SerialPorts() (allports []string, usbports []string, notecardports []string, err error)

SerialPorts returns the list of available serial ports

Types

type CardTest added in v1.1.16

type CardTest struct {
	DeviceUID  string `json:"device,omitempty"`
	Error      string `json:"err,omitempty"`
	Status     string `json:"status,omitempty"`
	Tests      string `json:"tests,omitempty"`
	FailTest   string `json:"fail_test,omitempty"`
	FailReason string `json:"fail_reason,omitempty"`
	Info       string `json:"info,omitempty"`
	Board      uint32 `json:"board,omitempty"`
	Modem      string `json:"modem,omitempty"`
	ICCID      string `json:"iccid,omitempty"`
	IMSI       string `json:"imsi,omitempty"`
	IMEI       string `json:"imei,omitempty"`
	When       int64  `json:"when,omitempty"`
	SKU        string `json:"sku,omitempty"`
	Station    string `json:"station,omitempty"`
	Operator   string `json:"operator,omitempty"`
	Check      uint32 `json:"check,omitempty"`
	Key        string `json:"key,omitempty"`
	// Firmware info
	FirmwareOrg     string `json:"org,omitempty"`
	FirmwareProduct string `json:"product,omitempty"`
	FirmwareVersion string `json:"version,omitempty"`
	FirmwareMajor   uint32 `json:"ver_major,omitempty"`
	FirmwareMinor   uint32 `json:"ver_minor,omitempty"`
	FirmwarePatch   uint32 `json:"ver_patch,omitempty"`
	FirmwareBuild   uint32 `json:"ver_build,omitempty"`
	FirmwareBuilt   string `json:"built,omitempty"`
	// Certificate info
	CertSN string `json:"certsn,omitempty"`
	Cert   string `json:"cert,omitempty"`
	// Setup requests
	SetupRequests string `json:"setup,omitempty"`
}

CardTest is a structure that is returned by the notecard after completing its self-test

type Context

type Context struct {

	// True to emit trace output
	Debug bool

	// Pretty-print trace output JSON
	Pretty bool

	// Class functions
	PortEnumFn     func() (allports []string, usbports []string, notecardports []string, err error)
	PortDefaultsFn func() (port string, portConfig int)
	CloseFn        func(context *Context)
	ReopenFn       func(context *Context, portConfig int) (err error)
	ResetFn        func(context *Context, portConfig int) (err error)
	TransactionFn  func(context *Context, portConfig int, noResponse bool, reqJSON []byte) (rspJSON []byte, err error)
	// contains filtered or unexported fields
}

Context for the port that is open

func Open

func Open(moduleInterface string, port string, portConfig int) (context *Context, err error)

Open the card to establish communications

func OpenI2C

func OpenI2C(port string, portConfig int) (context *Context, err error)

OpenI2C opens the card on I2C

func OpenRemote added in v1.2.3

func OpenRemote(farmURL string, farmCheckoutMins int) (context *Context, err error)

OpenRemote opens a remote card

func OpenSerial

func OpenSerial(port string, portConfig int) (context *Context, err error)

OpenSerial opens the card on serial

func (*Context) Close

func (context *Context) Close()

Close the port

func (*Context) DebugOutput added in v1.1.7

func (context *Context) DebugOutput(enabled bool, pretty bool)

DebugOutput enables/disables debug output

func (*Context) EnumPorts

func (context *Context) EnumPorts() (allports []string, usbports []string, notecardports []string, err error)

EnumPorts returns the list of all available ports on the specified interface

func (*Context) Identify added in v1.1.10

func (context *Context) Identify() (protocol string, port string, portConfig int)

Identify this Notecard connection

func (*Context) Interactive added in v1.1.21

func (context *Context) Interactive(watch bool, watchLevel int, prompt bool, watchCommand string, quitCommand string) (err error)

Interactive enters interactive request/response mode, disabling trace in case that was the last mode entered

func (*Context) PortDefaults

func (context *Context) PortDefaults() (port string, portConfig int)

PortDefaults gets the defaults for the specified port

func (*Context) Reopen added in v1.1.10

func (context *Context) Reopen(portConfig int) (err error)

Reopen the port

func (*Context) ReopenIfRequired added in v1.2.9

func (context *Context) ReopenIfRequired(portConfig int) (err error)

ReopenIfRequired reopens the port but only if required

func (*Context) Request

func (context *Context) Request(req map[string]interface{}) (err error)

Request performs a card transaction with a JSON structure and doesn't return a response (This is for semantic compatibility with other languages.)

func (*Context) RequestResponse

func (context *Context) RequestResponse(req map[string]interface{}) (rsp map[string]interface{}, err error)

RequestResponse performs a card transaction with a JSON structure and doesn't return a response (This is for semantic compatibility with other languages.)

func (*Context) Reset

func (context *Context) Reset(portConfig int) (err error)

Reset the port

func (*Context) Response added in v1.1.16

func (context *Context) Response() (rsp map[string]interface{}, err error)

Response is used in rare cases where there is a transaction that returns multiple responses

func (*Context) Trace

func (context *Context) Trace() (err error)

Trace the incoming serial output AND connect the input handler

func (*Context) TraceCapture added in v1.1.14

func (context *Context) TraceCapture(toSend string, toEnd string) (captured string, err error)

TraceCapture monitors the trace output until a delimiter is reached It then returns the received output to the caller.

func (*Context) Transaction

func (context *Context) Transaction(req map[string]interface{}) (rsp map[string]interface{}, err error)

Transaction performs a card transaction with a JSON structure

func (*Context) TransactionJSON

func (context *Context) TransactionJSON(reqJSON []byte) (rspJSON []byte, err error)

TransactionJSON performs a card transaction using raw JSON []bytes

func (*Context) TransactionJSONToPort added in v1.3.2

func (context *Context) TransactionJSONToPort(reqJSON []byte, portConfig int) (rspJSON []byte, err error)

TransactionJSONToPort performs a card transaction using raw JSON []bytes to a specified port

func (*Context) TransactionRequest

func (context *Context) TransactionRequest(req Request) (rsp Request, err error)

TransactionRequest performs a card transaction with a Req structure

func (*Context) TransactionRequestToPort added in v1.3.2

func (context *Context) TransactionRequestToPort(req Request, portConfig int) (rsp Request, err error)

TransactionRequestToPort performs a card transaction with a Req structure, to a specified port

type I2C

type I2C struct {
	// contains filtered or unexported fields
}

I2C is the handle to the I2C subsystem

type NetInfo added in v1.2.1

type NetInfo struct {
	Iccid            string `json:"iccid,omitempty"`
	IccidExternal    string `json:"iccid_external,omitempty"`
	Imsi             string `json:"imsi,omitempty"`
	ImsiExternal     string `json:"imsi_external,omitempty"`
	Imei             string `json:"imei,omitempty"`
	ModemFirmware    string `json:"modem,omitempty"`
	Band             string `json:"band,omitempty"`
	AccessTechnology string `json:"rat,omitempty"`
	// Radio signal strength in dBm, or ModemValueUnknown if it is not
	// available from the modem.
	RssiRange int32 `json:"rssir,omitempty"`
	Rssi      int32 `json:"rssi,omitempty"`
	// An integer indicating the reference signal received power (RSRP)
	Rsrp int32 `json:"rsrp,omitempty"`
	// An integer indicating the reference signal received quality (RSRQ)
	Rsrq int32 `json:"rsrq,omitempty"`
	// An integer indicating relative signal strength in a human-readable way
	Bars uint32 `json:"bars,omitempty"`
	// An integer indicating the signal to interference plus noise ratio (SINR).
	// Logarithmic value of SINR. Values are in 1/5th of a dB. The range is 0-250
	// which translates to -20dB - +30dB
	Sinr int32 `json:"sinr,omitempty"`
	// GSM RxQual, or ModemValueUnknown if it is not available from the modem.
	Rxqual int32 `json:"rxqual,omitempty"`
	// Device IP address
	IP string `json:"ip,omitempty"`
	// Device GW address
	Gw string `json:"gateway,omitempty"`
	// Device APN name
	Apn string `json:"apn,omitempty"`
	// Location area code (16 bits) or ModemValueUnknown if it is not avail from modem
	Lac uint32 `json:"lac,omitempty"`
	// Cell ID (28 bits) or ModemValueUnknown if it is not available from the modem.
	Cellid uint32 `json:"cid,omitempty"`
	// Network info
	NetworkBearer int32  `json:"bearer,omitempty"`
	Mcc           uint32 `json:"mcc,omitempty"`
	Mnc           uint32 `json:"mnc,omitempty"`
	// Overcurrent events
	OvercurrentEvents    int32 `json:"oc_events,omitempty"`
	OvercurrentEventSecs int32 `json:"oc_event_time,omitempty"`
	// Modem debug
	ModemDebugEvents int32 `json:"modem_test_events,omitempty"`
	// When the signal strength fields were last updated
	Modified int64 `json:"updated,omitempty"`
}

NetInfo is the composite structure with all networking connection info

type PinState

type PinState struct {
	High  bool     `json:"high,omitempty"`
	Low   bool     `json:"low,omitempty"`
	Count []uint32 `json:"count,omitempty"`
}

PinState describes the state of an AUX pin for hardware-related Notecard requests

type RemoteCard added in v1.2.3

type RemoteCard struct {
	Instance    string `json:"instance,omitempty"`
	Address     int    `json:"address,omitempty"`
	DirectURL   string `json:"direct,omitempty"`
	ProxyURL    string `json:"proxy,omitempty"`
	Version     string `json:"version,omitempty"`
	CardTest    string `json:"card,omitempty"`
	DeviceUID   string `json:"device,omitempty"`
	ProductUID  string `json:"product,omitempty"`
	SN          string `json:"sn,omitempty"`
	Reservation string `json:"reservation,omitempty"`
	Modified    uint32 `json:"modified,omitempty"`
	Refreshed   uint32 `json:"refreshed,omitempty"`
}

RemoteCard is the full description of notecards managed by the farm

type RemoteCards added in v1.2.3

type RemoteCards struct {
	Cards []RemoteCard `json:"notecards,omitempty"`
}

RemoteCards are the objects that get published

type Request

type Request struct {
	Req              string                        `json:"req,omitempty"`
	Cmd              string                        `json:"cmd,omitempty"`
	Err              string                        `json:"err,omitempty"`
	RequestID        uint32                        `json:"id,omitempty"`
	NotefileID       string                        `json:"file,omitempty"`
	TrackerID        string                        `json:"tracker,omitempty"`
	NoteID           string                        `json:"note,omitempty"`
	Body             *map[string]interface{}       `json:"body,omitempty"`
	Payload          *[]byte                       `json:"payload,omitempty"`
	Deleted          bool                          `json:"deleted,omitempty"`
	Start            bool                          `json:"start,omitempty"`
	Stop             bool                          `json:"stop,omitempty"`
	Delete           bool                          `json:"delete,omitempty"`
	USB              bool                          `json:"usb,omitempty"`
	Connected        bool                          `json:"connected,omitempty"`
	Secure           bool                          `json:"secure,omitempty"`
	Unsecure         bool                          `json:"unsecure,omitempty"`
	Alert            bool                          `json:"alert,omitempty"`
	Retry            bool                          `json:"retry,omitempty"`
	Signals          int32                         `json:"signals,omitempty"`
	Max              int32                         `json:"max,omitempty"`
	Changes          int32                         `json:"changes,omitempty"`
	Seconds          int32                         `json:"seconds,omitempty"`
	SecondsV         string                        `json:"vseconds,omitempty"`
	Minutes          int32                         `json:"minutes,omitempty"`
	MinutesV         string                        `json:"vminutes,omitempty"`
	Hours            int32                         `json:"hours,omitempty"`
	HoursV           string                        `json:"vhours,omitempty"`
	Days             int32                         `json:"days,omitempty"`
	Result           int32                         `json:"result,omitempty"`
	I2C              int32                         `json:"i2c,omitempty"`
	Status           string                        `json:"status,omitempty"`
	Version          string                        `json:"version,omitempty"`
	Name             string                        `json:"name,omitempty"`
	Org              string                        `json:"org,omitempty"`
	Role             string                        `json:"role,omitempty"`
	Email            string                        `json:"email,omitempty"`
	Area             string                        `json:"area,omitempty"`
	Country          string                        `json:"country,omitempty"`
	Zone             string                        `json:"zone,omitempty"`
	Mode             string                        `json:"mode,omitempty"`
	Host             string                        `json:"host,omitempty"`
	Movements        string                        `json:"movements,omitempty"`
	ProductUID       string                        `json:"product,omitempty"`
	DeviceUID        string                        `json:"device,omitempty"`
	RouteUID         string                        `json:"route,omitempty"`
	Files            *[]string                     `json:"files,omitempty"`
	FileInfo         *map[string]note.NotefileInfo `json:"info,omitempty"`
	Notes            *map[string]note.Info         `json:"notes,omitempty"`
	Pad              int32                         `json:"pad,omitempty"`
	Storage          int32                         `json:"storage,omitempty"`
	LocationOLC      string                        `json:"olc,omitempty"`
	Latitude         float64                       `json:"lat,omitempty"`
	Longitude        float64                       `json:"lon,omitempty"`
	Value            float64                       `json:"value,omitempty"`
	ValueV           string                        `json:"vvalue,omitempty"`
	SN               string                        `json:"sn,omitempty"`
	APN              string                        `json:"apn,omitempty"`
	Text             string                        `json:"text,omitempty"`
	Offset           int32                         `json:"offset,omitempty"`
	Length           int32                         `json:"length,omitempty"`
	Total            int32                         `json:"total,omitempty"`
	BytesSent        uint32                        `json:"bytes_sent,omitempty"`
	BytesReceived    uint32                        `json:"bytes_received,omitempty"`
	NotesSent        uint32                        `json:"notes_sent,omitempty"`
	NotesReceived    uint32                        `json:"notes_received,omitempty"`
	SessionsStandard uint32                        `json:"sessions_standard,omitempty"`
	SessionsSecure   uint32                        `json:"sessions_secure,omitempty"`
	Megabytes        int32                         `json:"megabytes,omitempty"`
	BytesPerDay      int32                         `json:"bytes_per_day,omitempty"`
	DataRate         float64                       `json:"rate,omitempty"`
	NumBytes         int32                         `json:"bytes,omitempty"`
	Template         bool                          `json:"template,omitempty"`
	BodyTemplate     string                        `json:"body_template,omitempty"`
	PayloadTemplate  int32                         `json:"payload_template,omitempty"`
	Allow            bool                          `json:"allow,omitempty"`
	Align            bool                          `json:"align,omitempty"`
	Limit            bool                          `json:"limit,omitempty"`
	Pending          bool                          `json:"pending,omitempty"`
	Charging         bool                          `json:"charging,omitempty"`
	On               bool                          `json:"on,omitempty"`
	Off              bool                          `json:"off,omitempty"`
	ReqTime          bool                          `json:"reqtime,omitempty"`
	ReqLoc           bool                          `json:"reqloc,omitempty"`
	Trace            string                        `json:"trace,omitempty"`
	Usage            *[]string                     `json:"usage,omitempty"`
	State            *[]PinState                   `json:"state,omitempty"`
	Time             int64                         `json:"time,omitempty"`
	Motion           int64                         `json:"motion,omitempty"`
	VMin             float64                       `json:"vmin,omitempty"`
	VMax             float64                       `json:"vmax,omitempty"`
	VAvg             float64                       `json:"vavg,omitempty"`
	Daily            float64                       `json:"daily,omitempty"`
	Weekly           float64                       `json:"weekly,omitempty"`
	Montly           float64                       `json:"monthly,omitempty"`
	Verify           bool                          `json:"verify,omitempty"`
	Set              bool                          `json:"set,omitempty"`
	Reset            bool                          `json:"reset,omitempty"`
	Calibration      float64                       `json:"calibration,omitempty"`
	Heartbeat        bool                          `json:"heartbeat,omitempty"`
	Threshold        int32                         `json:"threshold,omitempty"`
	Count            uint32                        `json:"count,omitempty"`
	Sync             bool                          `json:"sync,omitempty"`
	Live             bool                          `json:"live,omitempty"`
	Now              bool                          `json:"now,omitempty"`
	Type             int32                         `json:"type,omitempty"`
	Number           int64                         `json:"number,omitempty"`
	SKU              string                        `json:"sku,omitempty"`
	Board            string                        `json:"board,omitempty"`
	Net              *NetInfo                      `json:"net,omitempty"`
	Sensitivity      int32                         `json:"sensitivity,omitempty"`
	Requested        int32                         `json:"requested,omitempty"`
	Completed        int32                         `json:"completed,omitempty"`
	WiFi             bool                          `json:"wifi,omitempty"`
	Cell             bool                          `json:"cell,omitempty"`
	GPS              bool                          `json:"gps,omitempty"`
	Inbound          int32                         `json:"inbound,omitempty"`
	InboundV         string                        `json:"vinbound,omitempty"`
	Outbound         int32                         `json:"outbound,omitempty"`
	OutboundV        string                        `json:"voutbound,omitempty"`
	Duration         int32                         `json:"duration,omitempty"`
}

Request is the core API request/response data structure

type SyncLogBody added in v1.1.21

type SyncLogBody struct {
	TimeSecs    int64  `json:"time,omitempty"`
	BootMs      int64  `json:"sequence,omitempty"`
	DetailLevel uint32 `json:"level,omitempty"`
	Subsystem   string `json:"subsystem,omitempty"`
	Text        string `json:"text,omitempty"`
}

SyncLogBody is the data structure used in the SyncLogNotefile

Jump to

Keyboard shortcuts

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