Documentation ¶
Index ¶
- Constants
- Variables
- func CobsDecode(input []byte, xor byte) ([]byte, error)
- func CobsEncode(input []byte, xor byte) ([]byte, error)
- func CobsEncodedLength(length int) int
- func Defaults() (moduleInterface string, port string, portConfig int)
- func I2CDefaults() (port string, portConfig int)
- func I2CPorts() (allports []string, usbports []string, notecardports []string, err error)
- func NewBody() (body map[string]interface{})
- func NewCommand(reqType string) (cmd map[string]interface{})
- func NewRequest(reqType string) (req map[string]interface{})
- func SerialDefaults() (port string, portConfig int)
- func SerialPorts() (allports []string, usbports []string, notecardports []string, err error)
- type CardTest
- type Context
- func Open(moduleInterface string, port string, portConfig int) (context *Context, err error)
- func OpenI2C(port string, portConfig int) (context *Context, err error)
- func OpenLease(leaseScope string, leaseMins int) (context *Context, err error)
- func OpenSerial(port string, portConfig int) (context *Context, err error)
- func (context *Context) Close()
- func (context *Context) DebugOutput(enabled bool, pretty bool)
- func (context *Context) EnumPorts() (allports []string, usbports []string, notecardports []string, err error)
- func (context *Context) Identify() (protocol string, port string, portConfig int)
- func (context *Context) Interactive(watch bool, watchLevel int, prompt bool, watchCommand string, ...) (err error)
- func (context *Context) PortDefaults() (port string, portConfig int)
- func (context *Context) ReceiveBytes() (rspBytes []byte, err error)
- func (context *Context) Reopen(portConfig int) (err error)
- func (context *Context) ReopenIfRequired(portConfig int) (err error)
- func (context *Context) Request(req map[string]interface{}) (err error)
- func (context *Context) RequestResponse(req map[string]interface{}) (rsp map[string]interface{}, err error)
- func (context *Context) Reset(portConfig int) (err error)
- func (context *Context) Response() (rsp map[string]interface{}, err error)
- func (context *Context) SendBytes(reqBytes []byte) (err error)
- func (context *Context) Trace() (err error)
- func (context *Context) Transaction(req map[string]interface{}) (rsp map[string]interface{}, err error)
- func (context *Context) TransactionJSON(reqJSON []byte) (rspJSON []byte, err error)
- func (context *Context) TransactionJSONToPort(reqJSON []byte, portConfig int) (rspJSON []byte, err error)
- func (context *Context) TransactionRequest(req Request) (rsp Request, err error)
- func (context *Context) TransactionRequestToPort(req Request, portConfig int) (rsp Request, err error)
- func (context *Context) UserAgent() (ua map[string]interface{})
- type I2C
- type LeaseTransaction
- type NetInfo
- type PinState
- type Request
- type SyncLogBody
Constants ¶
const ( ReqReserve = "reserve" ReqTransaction = "transaction" )
Request types
const ( NetworkBearerUnknown = -1 NetworkBearerGsm = 0 NetworkBearerTdScdma = 1 NetworkBearerWcdma = 2 NetworkBearerCdma2000 = 3 NetworkBearerWiMax = 4 NetworkBearerLteTdd = 5 NetworkBearerLteFdd = 6 NetworkBearerNBIot = 7 NetworkBearerWLan = 21 NetworkBearerBluetooth = 22 NetworkBearerIeee802p15p4 = 23 NetworkBearerEthernet = 41 NetworkBearerDsl = 42 NetworkBearerPlc = 43 )
const ( NotecardInterfaceSerial = "serial" NotecardInterfaceI2C = "i2c" NotecardInterfaceLease = "lease" )
Module communication interfaces
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)
const CardRequestI2CSegmentDelayMs = 250
CardRequestI2CSegmentDelayMs (golint)
const CardRequestI2CSegmentMaxLen = 250
CardRequestI2CSegmentMaxLen (golint)
const CardRequestSerialSegmentDelayMs = 250
CardRequestSerialSegmentDelayMs (golint)
const CardRequestSerialSegmentMaxLen = 250
CardRequestSerialSegmentMaxLen (golint)
const (
// I2CSlave is the slave device address
I2CSlave = 0x0703
)
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.
const ReqCardAUX = "card.aux"
ReqCardAUX (golint)
const ReqCardAUXSerial = "card.aux.serial"
ReqCardAUXSerial (golint)
const ReqCardAttn = "card.attn"
ReqCardAttn (golint)
const ReqCardBinary = "card.binary"
ReqCardBinary (golint)
const ReqCardBinaryGet = "card.binary.get"
ReqCardBinaryGet (golint)
const ReqCardBinaryPut = "card.binary.put"
ReqCardBinaryPut (golint)
const ReqCardBootloader = "card.bootloader"
ReqCardBootloader (golint)
const ReqCardCarrier = "card.carrier"
ReqCardCarrier (golint)
const ReqCardCheckpoint = "card.checkpoint"
ReqCardCheckpoint (golint)
const ReqCardContact = "card.contact"
ReqCardContact (golint)
const ReqCardDFU = "card.dfu"
ReqCardDFU (golint)
const ReqCardIO = "card.io"
ReqCardIO (golint)
const ReqCardIllumination = "card.illumination"
ReqCardIllumination (golint)
const ReqCardLocation = "card.location"
ReqCardLocation (golint)
const ReqCardLocationMode = "card.location.mode"
ReqCardLocationMode (golint)
const ReqCardLocationTrack = "card.location.track"
ReqCardLocationTrack (golint)
const ReqCardLog = "card.log"
ReqCardLog (golint)
const ReqCardMonitor = "card.monitor"
ReqCardMonitor (golint)
const ReqCardMotion = "card.motion"
ReqCardMotion (golint)
const ReqCardMotionMode = "card.motion.mode"
ReqCardMotionMode (golint)
const ReqCardMotionSync = "card.motion.sync"
ReqCardMotionSync (golint)
const ReqCardMotionTrack = "card.motion.track"
ReqCardMotionTrack (golint)
const ReqCardPower = "card.power"
ReqCardPower (golint)
const ReqCardRandom = "card.random"
ReqCardRandom (golint)
const ReqCardReserve = "card.reserve"
ReqCardReserve (golint)
const ReqCardRestart = "card.restart"
ReqCardRestart (golint)
const ReqCardRestore = "card.restore"
ReqCardRestore (golint)
const ReqCardSetup = "card.setup"
ReqCardSetup (golint)
const ReqCardSleep = "card.sleep"
ReqCardSleep (golint)
const ReqCardStatus = "card.status"
ReqCardStatus (golint)
const ReqCardTemp = "card.temp"
ReqCardTemp (golint)
const ReqCardTest = "card.test"
ReqCardTest (golint)
const ReqCardTime = "card.time"
ReqCardTime (golint)
const ReqCardTrace = "card.trace"
ReqCardTrace (golint)
const ReqCardTransport = "card.transport"
ReqCardTransport (golint)
const ReqCardTriangulate = "card.triangulate"
ReqCardTriangulate (golint)
const ReqCardUsageGet = "card.usage.get"
ReqCardUsageGet (golint)
const ReqCardUsageRate = "card.usage.rate"
ReqCardUsageRate (golint)
const ReqCardUsageTest = "card.usage.test"
ReqCardUsageTest (golint)
const ReqCardVersion = "card.version"
ReqCardVersion (golint)
const ReqCardVoltage = "card.voltage"
ReqCardVoltage (golint)
const ReqCardWiFi = "card.wifi"
ReqCardWiFi (golint)
const ReqCardWireless = "card.wireless"
ReqCardWireless (golint)
const ReqCardWirelessPenalty = "card.wireless.penalty"
ReqCardWirelessPenalty (golint)
const ReqDFUGet = "dfu.get"
ReqDFUGet (golint)
const ReqDFUPut = "dfu.put"
ReqDFUPut (golint)
const ReqDFUStatus = "dfu.status"
ReqDFUStatus (golint)
const ReqEnvDefault = "env.default"
ReqEnvDefault (golint)
const ReqEnvGet = "env.get"
ReqEnvGet (golint)
const ReqEnvLocation = "env.location"
ReqEnvLocation (golint)
const ReqEnvModified = "env.modified"
ReqEnvModified (golint)
const ReqEnvSet = "env.set"
ReqEnvSet (golint)
const ReqEnvSync = "env.sync"
ReqEnvSync (golint)
const ReqEnvTemplate = "env.template"
ReqEnvTemplate (golint)
const ReqEnvTime = "env.time"
ReqEnvTime (golint)
const ReqEnvVersion = "env.version"
ReqEnvVersion (golint)
const ReqFileAdd = "file.add"
ReqFileAdd (golint)
const ReqFileChanges = "file.changes"
ReqFileChanges (golint)
const ReqFileChangesPending = "file.changes.pending"
ReqFileChangesPending (golint)
const ReqFileDelete = "file.delete"
ReqFileDelete (golint)
const ReqFileGetL = "file.get"
ReqFileGetL (golint)
const ReqFileSet = "file.set"
ReqFileSet (golint)
const ReqFileStats = "file.stats"
ReqFileStats (golint)
const ReqFileSync = "file.sync"
ReqFileSync (golint)
const ReqHubDFUGet = "hub.dfu.get"
ReqHubDFUGet (golint)
const ReqHubDFUGetL = "dfu.service.get"
ReqHubHubDFUGetL (golint)
const ReqHubEnvL = "hub.env"
ReqHubEnvL (golint)
const ReqHubEnvLL = "service.env"
ReqHubEnvLL (golint)
const ReqHubFileGet = "hub.file.get"
ReqHubFileGet (golint)
const ReqHubGet = "hub.get"
ReqHubGet (golint)
const ReqHubGetL = "service.get"
ReqHubGetL (golint)
const ReqHubLog = "hub.log"
ReqHubLog (golint)
const ReqHubLogL = "service.log"
ReqHubLogL (golint)
const ReqHubSet = "hub.set"
ReqHubSet (golint)
const ReqHubSetL = "service.set"
ReqHubSetL (golint)
const ReqHubSignal = "hub.signal"
ReqHubSignal (golint)
const ReqHubSignalL = "service.signal"
ReqHubSignalL (golint)
const ReqHubStatus = "hub.status"
ReqHubStatus (golint)
const ReqHubStatusL = "service.status"
ReqHubStatusL (golint)
const ReqHubSync = "hub.sync"
ReqHubSync (golint)
const ReqHubSyncL = "service.sync"
ReqHubSyncL (golint)
const ReqHubSyncStatus = "hub.sync.status"
ReqHubSyncStatus (golint)
const ReqHubSyncStatusL = "service.sync.status"
ReqHubSyncStatusL (golint)
const ReqNoteAdd = "note.add"
ReqNoteAdd (golint)
const ReqNoteChanges = "note.changes"
ReqNoteChanges (golint)
const ReqNoteDecrypt = "note.decrypt"
ReqNoteDecrypt (golint)
const ReqNoteDelete = "note.delete"
ReqNoteDelete (golint)
const ReqNoteEncrypt = "note.encrypt"
ReqNoteEncrypt (golint)
const ReqNoteEvent = "note.event"
ReqNoteEvent (golint)
const ReqNoteGet = "note.get"
ReqNoteGet (golint)
const ReqNoteTemplate = "note.template"
ReqNoteTemplate (golint)
const ReqNoteUpdate = "note.update"
ReqNoteUpdate (golint)
const ReqNotesGetL = "notes.get"
ReqNotesGetL (golint)
const ReqWeb = "web"
ReqWeb (golint)
const ReqWebDelete = "web.delete"
ReqWebDelete (golint)
const ReqWebGet = "web.get"
ReqWebGet (golint)
const ReqWebPost = "web.post"
ReqWebPost (golint)
const ReqWebPut = "web.put"
ReqWebPut (golint)
const SyncLogLevelAll = SyncLogLevelProg
SyncLogLevelAll is all events
const SyncLogLevelDetail = 2
SyncLogLevelDetail is major, minor, and detailed events
const SyncLogLevelMajor = 0
SyncLogLevelMajor is just major events
const SyncLogLevelMinor = 1
SyncLogLevelMinor is just major and minor events
const SyncLogLevelNone = -1
SyncLogLevelNone is no events
const SyncLogLevelProg = 3
SyncLogLevelProg is everything plus programmatically-targeted
const SyncLogNotefile = "_synclog.qi"
SyncLogNotefile is the special notefile containing sync log info
Variables ¶
var DoNotReterminateJSON = false
var IgnoreWindowsHWErrSecs = 2
IgnoreWindowsHWErrSecs is the amount of time to ignore a Windows serial communiction error.
var InitialDebugMode = false
InitialDebugMode is the debug mode that the context is initialized with
var InitialResetMode = true
InitialResetMode says whether or not we should reset the port on entry
var InitialTraceMode = false
InitialTraceMode is whether or not we will be entering trace mode, to prevent reservationsa
var RequestSegmentDelayMs = -1
RequestSegmentDelayMs (golint)
var RequestSegmentMaxLen = -1
RequestSegmentMaxLen (golint)
var SerialTimeoutMs = 30000
SerialTimeoutMs is the response timeout for Notecard serial communications.
Functions ¶
func CobsDecode ¶ added in v1.6.7
Decode with optional XOR
func CobsEncode ¶ added in v1.6.7
Encode with optional XOR
func CobsEncodedLength ¶ added in v1.6.10
Get the maximum size of the cobs-encoded buffer
func I2CDefaults ¶
I2CDefaults returns the default serial parameters
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
NewCommand creates a new command that requires no response from the notecard.
func NewRequest ¶ added in v1.1.5
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 := notecard.NewRequest("note.add")
func SerialDefaults ¶
SerialDefaults returns the default serial parameters
Types ¶
type CardTest ¶ added in v1.1.16
type CardTest struct { DeviceUID string `json:"device,omitempty"` DefaultProductUID string `json:"default_product,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"` BoardVersion uint32 `json:"board,omitempty"` BoardType uint32 `json:"board_type,omitempty"` Modem string `json:"modem,omitempty"` ICCID string `json:"iccid,omitempty"` ICCID2 string `json:"iccid2,omitempty"` IMSI string `json:"imsi,omitempty"` IMSI2 string `json:"imsi2,omitempty"` IMEI string `json:"imei,omitempty"` When uint32 `json:"when,omitempty"` SKU string `json:"sku,omitempty"` OrderingCode string `json:"ordering_code,omitempty"` SIMActivationKey string `json:"key,omitempty"` Station string `json:"station,omitempty"` Operator string `json:"operator,omitempty"` Check uint32 `json:"check,omitempty"` CellUsageBytes uint32 `json:"cell_used,omitempty"` CellProvisionedTime uint32 `json:"cell_provisioned,omitempty"` LSEStability string `json:"lse,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"` // LoRa notecard provisioning info DevEui string `json:"deveui,omitempty"` AppEui string `json:"appeui,omitempty"` AppKey string `json:"appkey,omitempty"` FreqPlan string `json:"freqplan,omitempty"` LWVersion string `json:"lorawan,omitempty"` PHVersion string `json:"regional,omitempty"` // Certificate and cert info CertSN string `json:"certsn,omitempty"` Cert string `json:"cert,omitempty"` // Card initialization 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 // Disable generation of User Agent object DisableUA 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 OpenSerial ¶
OpenSerial opens the card on serial
func (*Context) DebugOutput ¶ added in v1.1.7
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) 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 ¶
PortDefaults gets the defaults for the specified port
func (*Context) ReceiveBytes ¶ added in v1.5.1
ReceiveBytes receives arbitrary Bytes from the Notecard
func (*Context) ReopenIfRequired ¶ added in v1.2.9
ReopenIfRequired reopens the port but only if required
func (*Context) Request ¶
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) Response ¶ added in v1.1.16
Response is used in rare cases where there is a transaction that returns multiple responses
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 ¶
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 ¶
TransactionRequest performs a card transaction with a Req structure
type I2C ¶
type I2C struct {
// contains filtered or unexported fields
}
I2C is the handle to the I2C subsystem
type LeaseTransaction ¶ added in v1.6.11
type LeaseTransaction struct { Request string `json:"req,omitempty"` Lessor string `json:"lessor,omitempty"` Scope string `json:"scope,omitempty"` Expires int64 `json:"expires,omitempty"` Error string `json:"err,omitempty"` DeviceUID string `json:"device,omitempty"` NoResponse bool `json:"no_response,omitempty"` ReqJSON string `json:"request_json,omitempty"` RspJSON string `json:"response_json,omitempty"` }
Lease transaction
type NetInfo ¶ added in v1.2.1
type NetInfo struct { Iccid string `json:"iccid,omitempty"` Iccid2 string `json:"iccid2,omitempty"` IccidExternal string `json:"iccid_external,omitempty"` Imsi string `json:"imsi,omitempty"` Imsi2 string `json:"imsi2,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"` Bssid string `json:"bssid,omitempty"` Ssid string `json:"ssid,omitempty"` // Internal vs external SIM used at any given moment InternalSIMSelected bool `json:"internal,omitempty"` // Radio signal strength in dBm, or ModemValueUnknown if it is not // available from the modem. RssiRange int32 `json:"rssir,omitempty"` // GSM RxQual, or ModemValueUnknown if it is not available from the modem. Rxqual int32 `json:"rxqual,omitempty"` // General received signal strength, in dBm Rssi int32 `json:"rssi,omitempty"` // An integer indicating the reference signal received power (RSRP) Rsrp int32 `json:"rsrp,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"` // 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"` // IP address assigned to the device IP string `json:"ip,omitempty"` // IP address that the device is talking to (if known) 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"` // Modem debug ModemDebugEvents int32 `json:"modem_test_events,omitempty"` // Overcurrent events OvercurrentEvents int32 `json:"oc_events,omitempty"` OvercurrentEventSecs int32 `json:"oc_event_time,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 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"` Edge bool `json:"edge,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"` Names *[]string `json:"names,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"` LocationTime int64 `json:"ltime,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"` Base int32 `json:"base,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"` BytesSentSecondary uint32 `json:"bytes_sent_secondary,omitempty"` BytesReceivedSecondary uint32 `json:"bytes_received_secondary,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 uint32 `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"` 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"` // Time is defined as uint32 on Notecard and int64 on Notehub. See the rationale below. Motion uint32 `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"` Confirm bool `json:"confirm,omitempty"` Port int32 `json:"port,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"` OrderingCode string `json:"ordering_code,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"` LoRa bool `json:"lora,omitempty"` NTN bool `json:"ntn,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"` Temperature float64 `json:"temperature,omitempty"` Pressure float64 `json:"pressure,omitempty"` Humidity float64 `json:"humidity,omitempty"` API int32 `json:"api,omitempty"` SSID string `json:"ssid,omitempty"` Password string `json:"password,omitempty"` Security string `json:"security,omitempty"` Key string `json:"key,omitempty"` Method string `json:"method,omitempty"` Content string `json:"content,omitempty"` Min int32 `json:"min,omitempty"` Add int32 `json:"add,omitempty"` Encrypt bool `json:"encrypt,omitempty"` Decrypt bool `json:"decrypt,omitempty"` Alt bool `json:"alt,omitempty"` Scan bool `json:"scan,omitempty"` Journey bool `json:"journey,omitempty"` UOff bool `json:"uoff,omitempty"` UMin bool `json:"umin,omitempty"` UPeriodic bool `json:"uperiodic,omitempty"` Milliseconds int32 `json:"ms,omitempty"` Full bool `json:"full,omitempty"` Async bool `json:"async,omitempty"` Binary bool `json:"binary,omitempty"` Cobs int32 `json:"cobs,omitempty"` Append bool `json:"append,omitempty"` Details *map[string]interface{} `json:"details,omitempty"` Tower *note.TowerLocation `json:"tower,omitempty"` Change float64 `json:"change,omitempty"` Format string `json:"format,omitempty"` Voltage float64 `json:"voltage,omitempty"` MilliampHours float64 `json:"milliamp_hours,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