Documentation ¶
Index ¶
- Constants
- Variables
- func CrashTypeNames() []string
- func CrashTypeToString(ct CrashType) string
- type Cmd
- type CmdBase
- type ConfigReadCmd
- type ConfigReadResult
- type ConfigWriteCmd
- type ConfigWriteResult
- type CoreEraseCmd
- type CoreEraseResult
- type CoreListCmd
- type CoreListResult
- type CoreLoadCmd
- type CoreLoadProgressFn
- type CoreLoadResult
- type CrashCmd
- type CrashResult
- type CrashType
- type DateTimeReadCmd
- type DateTimeReadResult
- type DateTimeWriteCmd
- type DateTimeWriteResult
- type EchoCmd
- type EchoResult
- type FsDownloadCmd
- type FsDownloadProgressCb
- type FsDownloadResult
- type FsUploadCmd
- type FsUploadProgressCb
- type FsUploadResult
- type ImageEraseCmd
- type ImageEraseResult
- type ImageStateReadCmd
- type ImageStateReadResult
- type ImageStateWriteCmd
- type ImageStateWriteResult
- type ImageUpgradeCmd
- type ImageUpgradeResult
- type ImageUploadCmd
- type ImageUploadIntTracker
- func (t *ImageUploadIntTracker) CheckWindow() bool
- func (t *ImageUploadIntTracker) HandleError(off int, err error) bool
- func (t *ImageUploadIntTracker) HandleResponse(c *ImageUploadCmd, rsp nmp.NmpRsp, res *ImageUploadResult) bool
- func (t *ImageUploadIntTracker) ProcessMissedChunks()
- func (t *ImageUploadIntTracker) UpdateTracker(off int, status int)
- type ImageUploadProgressFn
- type ImageUploadResult
- type LogClearCmd
- type LogClearResult
- type LogLevelListCmd
- type LogLevelListResult
- type LogListCmd
- type LogListResult
- type LogModuleListCmd
- type LogModuleListResult
- type LogShowCmd
- type LogShowFullCmd
- type LogShowFullProgressFn
- type LogShowFullResult
- type LogShowResult
- type MempoolStatCmd
- type MempoolStatResult
- type ResCmd
- type ResNoRxCmd
- type ResNoRxResult
- type ResResult
- type ResetCmd
- type ResetResult
- type Result
- type RunListCmd
- type RunListResult
- type RunTestCmd
- type RunTestResult
- type ShellExecCmd
- type ShellExecResult
- type StatListCmd
- type StatListResult
- type StatReadCmd
- type StatReadResult
- type TaskStatCmd
- type TaskStatResult
Constants ¶
View Source
const IMAGE_UPLOAD_CHUNK_MISSED_WM = -1
View Source
const IMAGE_UPLOAD_DEF_MAX_WS = 5
View Source
const IMAGE_UPLOAD_MAX_CHUNK = 512
//////////////////////////////////////////////////////////////////////////// $upload // ////////////////////////////////////////////////////////////////////////////
View Source
const IMAGE_UPLOAD_MIN_1ST_CHUNK = 32
View Source
const IMAGE_UPLOAD_START_WS = 1
View Source
const IMAGE_UPLOAD_STATUS_EXPECTED = 0
View Source
const IMAGE_UPLOAD_STATUS_MISSED = -1
View Source
const IMAGE_UPLOAD_STATUS_RQ = 1
Variables ¶
View Source
var CrashTypeNameMap = map[CrashType]string{ CRASH_TYPE_DIV0: "div0", CRASH_TYPE_JUMP0: "jump0", CRASH_TYPE_REF0: "ref0", CRASH_TYPE_ASSERT: "assert", CRASH_TYPE_WDOG: "wdog", }
Functions ¶
func CrashTypeNames ¶
func CrashTypeNames() []string
func CrashTypeToString ¶
Types ¶
type CmdBase ¶
type CmdBase struct {
// contains filtered or unexported fields
}
func NewCmdBase ¶
func NewCmdBase() CmdBase
func (*CmdBase) SetTxOptions ¶
type ConfigReadCmd ¶
func NewConfigReadCmd ¶
func NewConfigReadCmd() *ConfigReadCmd
type ConfigReadResult ¶
type ConfigReadResult struct {
Rsp *nmp.ConfigReadRsp
}
func (*ConfigReadResult) Status ¶
func (r *ConfigReadResult) Status() int
type ConfigWriteCmd ¶
func NewConfigWriteCmd ¶
func NewConfigWriteCmd() *ConfigWriteCmd
type ConfigWriteResult ¶
type ConfigWriteResult struct {
Rsp *nmp.ConfigWriteRsp
}
func (*ConfigWriteResult) Status ¶
func (r *ConfigWriteResult) Status() int
type CoreEraseCmd ¶
type CoreEraseCmd struct {
CmdBase
}
func NewCoreEraseCmd ¶
func NewCoreEraseCmd() *CoreEraseCmd
type CoreEraseResult ¶
type CoreEraseResult struct {
Rsp *nmp.CoreEraseRsp
}
func (*CoreEraseResult) Status ¶
func (r *CoreEraseResult) Status() int
type CoreListCmd ¶
type CoreListCmd struct {
CmdBase
}
func NewCoreListCmd ¶
func NewCoreListCmd() *CoreListCmd
type CoreListResult ¶
type CoreListResult struct {
Rsp *nmp.CoreListRsp
}
func (*CoreListResult) Status ¶
func (r *CoreListResult) Status() int
type CoreLoadCmd ¶
type CoreLoadCmd struct { CmdBase ProgressCb CoreLoadProgressFn }
func NewCoreLoadCmd ¶
func NewCoreLoadCmd() *CoreLoadCmd
type CoreLoadProgressFn ¶
type CoreLoadProgressFn func(c *CoreLoadCmd, r *nmp.CoreLoadRsp)
type CoreLoadResult ¶
type CoreLoadResult struct {
Rsps []*nmp.CoreLoadRsp
}
func (*CoreLoadResult) Status ¶
func (r *CoreLoadResult) Status() int
type CrashCmd ¶
func NewCrashCmd ¶
func NewCrashCmd() *CrashCmd
type CrashResult ¶
func (*CrashResult) Status ¶
func (r *CrashResult) Status() int
type DateTimeReadCmd ¶
type DateTimeReadCmd struct {
CmdBase
}
func NewDateTimeReadCmd ¶
func NewDateTimeReadCmd() *DateTimeReadCmd
type DateTimeReadResult ¶
type DateTimeReadResult struct {
Rsp *nmp.DateTimeReadRsp
}
func (*DateTimeReadResult) Status ¶
func (r *DateTimeReadResult) Status() int
type DateTimeWriteCmd ¶
func NewDateTimeWriteCmd ¶
func NewDateTimeWriteCmd() *DateTimeWriteCmd
type DateTimeWriteResult ¶
type DateTimeWriteResult struct {
Rsp *nmp.DateTimeWriteRsp
}
func (*DateTimeWriteResult) Status ¶
func (r *DateTimeWriteResult) Status() int
type EchoCmd ¶
func NewEchoCmd ¶
func NewEchoCmd() *EchoCmd
type EchoResult ¶
func (*EchoResult) Status ¶
func (r *EchoResult) Status() int
type FsDownloadCmd ¶
type FsDownloadCmd struct { CmdBase Name string ProgressCb FsDownloadProgressCb }
func NewFsDownloadCmd ¶
func NewFsDownloadCmd() *FsDownloadCmd
type FsDownloadProgressCb ¶
type FsDownloadProgressCb func(c *FsDownloadCmd, r *nmp.FsDownloadRsp)
type FsDownloadResult ¶
type FsDownloadResult struct {
Rsps []*nmp.FsDownloadRsp
}
func (*FsDownloadResult) Status ¶
func (r *FsDownloadResult) Status() int
type FsUploadCmd ¶
type FsUploadCmd struct { CmdBase Name string Data []byte ProgressCb FsUploadProgressCb }
func NewFsUploadCmd ¶
func NewFsUploadCmd() *FsUploadCmd
type FsUploadProgressCb ¶
type FsUploadProgressCb func(c *FsUploadCmd, r *nmp.FsUploadRsp)
type FsUploadResult ¶
type FsUploadResult struct {
Rsps []*nmp.FsUploadRsp
}
func (*FsUploadResult) Status ¶
func (r *FsUploadResult) Status() int
type ImageEraseCmd ¶
type ImageEraseCmd struct {
CmdBase
}
func NewImageEraseCmd ¶
func NewImageEraseCmd() *ImageEraseCmd
type ImageEraseResult ¶
type ImageEraseResult struct {
Rsp *nmp.ImageEraseRsp
}
func (*ImageEraseResult) Status ¶
func (r *ImageEraseResult) Status() int
type ImageStateReadCmd ¶
type ImageStateReadCmd struct {
CmdBase
}
func NewImageStateReadCmd ¶
func NewImageStateReadCmd() *ImageStateReadCmd
type ImageStateReadResult ¶
type ImageStateReadResult struct {
Rsp *nmp.ImageStateRsp
}
func (*ImageStateReadResult) Status ¶
func (r *ImageStateReadResult) Status() int
type ImageStateWriteCmd ¶
func NewImageStateWriteCmd ¶
func NewImageStateWriteCmd() *ImageStateWriteCmd
type ImageStateWriteResult ¶
type ImageStateWriteResult struct {
Rsp *nmp.ImageStateRsp
}
func (*ImageStateWriteResult) Status ¶
func (r *ImageStateWriteResult) Status() int
type ImageUpgradeCmd ¶
type ImageUpgradeCmd struct { CmdBase Data []byte NoErase bool ProgressCb ImageUploadProgressFn LastOff uint32 Upgrade bool ProgressBar *pb.ProgressBar ImageNum int MaxWinSz int }
func NewImageUpgradeCmd ¶
func NewImageUpgradeCmd() *ImageUpgradeCmd
type ImageUpgradeResult ¶
type ImageUpgradeResult struct { EraseRes *ImageEraseResult UploadRes *ImageUploadResult }
func (*ImageUpgradeResult) Status ¶
func (r *ImageUpgradeResult) Status() int
type ImageUploadCmd ¶
type ImageUploadCmd struct { CmdBase Data []byte StartOff int Upgrade bool ProgressCb ImageUploadProgressFn ImageNum int MaxWinSz int }
func NewImageUploadCmd ¶
func NewImageUploadCmd() *ImageUploadCmd
type ImageUploadIntTracker ¶
type ImageUploadIntTracker struct { Mutex sync.Mutex TuneWS bool RspMap map[int]int WCount int WCap int Off int MaxRxOff int32 }
func (*ImageUploadIntTracker) CheckWindow ¶
func (t *ImageUploadIntTracker) CheckWindow() bool
func (*ImageUploadIntTracker) HandleError ¶
func (t *ImageUploadIntTracker) HandleError(off int, err error) bool
func (*ImageUploadIntTracker) HandleResponse ¶
func (t *ImageUploadIntTracker) HandleResponse(c *ImageUploadCmd, rsp nmp.NmpRsp, res *ImageUploadResult) bool
func (*ImageUploadIntTracker) ProcessMissedChunks ¶
func (t *ImageUploadIntTracker) ProcessMissedChunks()
func (*ImageUploadIntTracker) UpdateTracker ¶
func (t *ImageUploadIntTracker) UpdateTracker(off int, status int)
type ImageUploadProgressFn ¶
type ImageUploadProgressFn func(c *ImageUploadCmd, r *nmp.ImageUploadRsp)
type ImageUploadResult ¶
type ImageUploadResult struct {
Rsps []*nmp.ImageUploadRsp
}
func (*ImageUploadResult) Status ¶
func (r *ImageUploadResult) Status() int
type LogClearCmd ¶
type LogClearCmd struct {
CmdBase
}
func NewLogClearCmd ¶
func NewLogClearCmd() *LogClearCmd
type LogClearResult ¶
type LogClearResult struct {
Rsp *nmp.LogClearRsp
}
func (*LogClearResult) Status ¶
func (r *LogClearResult) Status() int
type LogLevelListCmd ¶
type LogLevelListCmd struct {
CmdBase
}
func NewLogLevelListCmd ¶
func NewLogLevelListCmd() *LogLevelListCmd
type LogLevelListResult ¶
type LogLevelListResult struct {
Rsp *nmp.LogLevelListRsp
}
func (*LogLevelListResult) Status ¶
func (r *LogLevelListResult) Status() int
type LogListCmd ¶
type LogListCmd struct {
CmdBase
}
func NewLogListCmd ¶
func NewLogListCmd() *LogListCmd
type LogListResult ¶
type LogListResult struct {
Rsp *nmp.LogListRsp
}
func (*LogListResult) Status ¶
func (r *LogListResult) Status() int
type LogModuleListCmd ¶
type LogModuleListCmd struct {
CmdBase
}
func NewLogModuleListCmd ¶
func NewLogModuleListCmd() *LogModuleListCmd
type LogModuleListResult ¶
type LogModuleListResult struct {
Rsp *nmp.LogModuleListRsp
}
func (*LogModuleListResult) Status ¶
func (r *LogModuleListResult) Status() int
type LogShowCmd ¶
func NewLogShowCmd ¶
func NewLogShowCmd() *LogShowCmd
type LogShowFullCmd ¶
type LogShowFullCmd struct { CmdBase Name string Index uint32 ProgressCb LogShowFullProgressFn }
func NewLogShowFullCmd ¶
func NewLogShowFullCmd() *LogShowFullCmd
type LogShowFullProgressFn ¶
type LogShowFullProgressFn func(c *LogShowFullCmd, r *nmp.LogShowRsp)
type LogShowFullResult ¶
type LogShowFullResult struct {
Rsps []*nmp.LogShowRsp
}
func (*LogShowFullResult) Status ¶
func (r *LogShowFullResult) Status() int
type LogShowResult ¶
type LogShowResult struct {
Rsp *nmp.LogShowRsp
}
func (*LogShowResult) Status ¶
func (r *LogShowResult) Status() int
type MempoolStatCmd ¶
type MempoolStatCmd struct {
CmdBase
}
func NewMempoolStatCmd ¶
func NewMempoolStatCmd() *MempoolStatCmd
type MempoolStatResult ¶
type MempoolStatResult struct {
Rsp *nmp.MempoolStatRsp
}
func (*MempoolStatResult) Status ¶
func (r *MempoolStatResult) Status() int
type ResNoRxCmd ¶
func NewResNoRxCmd ¶
func NewResNoRxCmd() *ResNoRxCmd
type ResNoRxResult ¶
type ResNoRxResult struct { }
func (*ResNoRxResult) Status ¶
func (r *ResNoRxResult) Status() int
type ResetCmd ¶
func NewResetCmd ¶
func NewResetCmd() *ResetCmd
type ResetResult ¶
func (*ResetResult) Status ¶
func (r *ResetResult) Status() int
type RunListCmd ¶
type RunListCmd struct {
CmdBase
}
func NewRunListCmd ¶
func NewRunListCmd() *RunListCmd
type RunListResult ¶
type RunListResult struct {
Rsp *nmp.RunListRsp
}
func (*RunListResult) Status ¶
func (r *RunListResult) Status() int
type RunTestCmd ¶
func NewRunTestCmd ¶
func NewRunTestCmd() *RunTestCmd
type RunTestResult ¶
type RunTestResult struct {
Rsp *nmp.RunTestRsp
}
func (*RunTestResult) Status ¶
func (r *RunTestResult) Status() int
type ShellExecCmd ¶
func NewShellExecCmd ¶
func NewShellExecCmd() *ShellExecCmd
type ShellExecResult ¶
type ShellExecResult struct {
Rsp *nmp.ShellExecRsp
}
func (*ShellExecResult) Status ¶
func (r *ShellExecResult) Status() int
type StatListCmd ¶
type StatListCmd struct {
CmdBase
}
func NewStatListCmd ¶
func NewStatListCmd() *StatListCmd
type StatListResult ¶
type StatListResult struct {
Rsp *nmp.StatListRsp
}
func (*StatListResult) Status ¶
func (r *StatListResult) Status() int
type StatReadCmd ¶
func NewStatReadCmd ¶
func NewStatReadCmd() *StatReadCmd
type StatReadResult ¶
type StatReadResult struct {
Rsp *nmp.StatReadRsp
}
func (*StatReadResult) Status ¶
func (r *StatReadResult) Status() int
type TaskStatCmd ¶
type TaskStatCmd struct {
CmdBase
}
func NewTaskStatCmd ¶
func NewTaskStatCmd() *TaskStatCmd
type TaskStatResult ¶
type TaskStatResult struct {
Rsp *nmp.TaskStatRsp
}
func (*TaskStatResult) Status ¶
func (r *TaskStatResult) Status() int
Click to show internal directories.
Click to hide internal directories.