Versions in this module Expand all Collapse all v1 v1.0.2 Oct 3, 2023 v1.0.1 Oct 3, 2023 Changes in this version + const LEVEL_CRITICAL + const LEVEL_DEBUG + const LEVEL_ERROR + const LEVEL_INFO + const LEVEL_MAX + const LEVEL_WARN + const LOG_ENTRY_TYPE_BINARY + const LOG_ENTRY_TYPE_CBOR + const LOG_ENTRY_TYPE_STRING + const MEMORY_LOG + const MODULE_DEFAULT + const MODULE_MAX + const MODULE_NEWTMGR + const MODULE_NFFS + const MODULE_NIMBLE_CTLR + const MODULE_NIMBLE_HOST + const MODULE_OS + const MODULE_REBOOT + const MODULE_TEST + const NMP_ERR_EINVAL + const NMP_ERR_ENOENT + const NMP_ERR_ENOMEM + const NMP_ERR_ETIMEOUT + const NMP_ERR_EUNKNOWN + const NMP_ERR_OK + const NMP_GROUP_CONFIG + const NMP_GROUP_CRASH + const NMP_GROUP_DEFAULT + const NMP_GROUP_FS + const NMP_GROUP_IMAGE + const NMP_GROUP_LOG + const NMP_GROUP_PERUSER + const NMP_GROUP_RUN + const NMP_GROUP_SHELL + const NMP_GROUP_SPLIT + const NMP_GROUP_STAT + const NMP_HDR_SIZE + const NMP_ID_CONFIG_VAL + const NMP_ID_CRASH_TRIGGER + const NMP_ID_DEF_CONS_ECHO_CTRL + const NMP_ID_DEF_DATETIME_STR + const NMP_ID_DEF_ECHO + const NMP_ID_DEF_MPSTAT + const NMP_ID_DEF_RESET + const NMP_ID_DEF_TASKSTAT + const NMP_ID_FS_FILE + const NMP_ID_IMAGE_CORELIST + const NMP_ID_IMAGE_CORELOAD + const NMP_ID_IMAGE_ERASE + const NMP_ID_IMAGE_STATE + const NMP_ID_IMAGE_UPLOAD + const NMP_ID_LOG_APPEND + const NMP_ID_LOG_CLEAR + const NMP_ID_LOG_LEVEL_LIST + const NMP_ID_LOG_LIST + const NMP_ID_LOG_MODULE_LIST + const NMP_ID_LOG_SHOW + const NMP_ID_RUN_LIST + const NMP_ID_RUN_TEST + const NMP_ID_SHELL_EXEC + const NMP_ID_STAT_LIST + const NMP_ID_STAT_READ + const NMP_OP_READ + const NMP_OP_READ_RSP + const NMP_OP_WRITE + const NMP_OP_WRITE_RSP + const STORAGE_LOG + const STREAM_LOG + var LogEntryTypeStringMap = map[LogEntryType]string + var LogLevelNameMap = map[int]string + var LogModuleNameMap = map[int]string + var LogTypeNameMap = map[int]string + func BodyBytes(body interface{}) ([]byte, error) + func EncodeNmpPlain(nmr *NmpMsg) ([]byte, error) + func LogEntryTypeToString(LogType LogEntryType) string + func LogLevelToString(lm int) string + func LogModuleToString(lm int) string + func LogTypeToString(lm int) string + func RegisterResponseHandler(ogi Ogi, f rspCtor) + type ConfigReadReq struct + Name string + func NewConfigReadReq() *ConfigReadReq + func (r *ConfigReadReq) Msg() *NmpMsg + type ConfigReadRsp struct + Rc int + Val string + func NewConfigReadRsp() *ConfigReadRsp + func (r *ConfigReadRsp) Msg() *NmpMsg + type ConfigWriteReq struct + Name string + Save bool + Val string + func NewConfigWriteReq() *ConfigWriteReq + func (r *ConfigWriteReq) Msg() *NmpMsg + type ConfigWriteRsp struct + Rc int + func NewConfigWriteRsp() *ConfigWriteRsp + func (r *ConfigWriteRsp) Msg() *NmpMsg + type CoreEraseReq struct + func NewCoreEraseReq() *CoreEraseReq + func (r *CoreEraseReq) Msg() *NmpMsg + type CoreEraseRsp struct + Rc int + func NewCoreEraseRsp() *CoreEraseRsp + func (r *CoreEraseRsp) Msg() *NmpMsg + type CoreListReq struct + func NewCoreListReq() *CoreListReq + func (r *CoreListReq) Msg() *NmpMsg + type CoreListRsp struct + Rc int + func NewCoreListRsp() *CoreListRsp + func (r *CoreListRsp) Msg() *NmpMsg + type CoreLoadReq struct + Off uint32 + func NewCoreLoadReq() *CoreLoadReq + func (r *CoreLoadReq) Msg() *NmpMsg + type CoreLoadRsp struct + Data []byte + Len uint32 + Off uint32 + Rc int + func NewCoreLoadRsp() *CoreLoadRsp + func (r *CoreLoadRsp) Msg() *NmpMsg + type CrashReq struct + CrashType string + func NewCrashReq() *CrashReq + func (r *CrashReq) Msg() *NmpMsg + type CrashRsp struct + Rc int + func NewCrashRsp() *CrashRsp + func (r *CrashRsp) Msg() *NmpMsg + type DateTimeReadReq struct + func NewDateTimeReadReq() *DateTimeReadReq + func (r *DateTimeReadReq) Msg() *NmpMsg + type DateTimeReadRsp struct + DateTime string + Rc int + func NewDateTimeReadRsp() *DateTimeReadRsp + func (r *DateTimeReadRsp) Msg() *NmpMsg + type DateTimeWriteReq struct + DateTime string + func NewDateTimeWriteReq() *DateTimeWriteReq + func (r *DateTimeWriteReq) Msg() *NmpMsg + type DateTimeWriteRsp struct + Rc int + func NewDateTimeWriteRsp() *DateTimeWriteRsp + func (r *DateTimeWriteRsp) Msg() *NmpMsg + type Dispatcher struct + func NewDispatcher(logDepth int) *Dispatcher + func (d *Dispatcher) AddListener(seq uint8) (*Listener, error) + func (d *Dispatcher) Dispatch(data []byte) bool + func (d *Dispatcher) DispatchRsp(r NmpRsp) bool + func (d *Dispatcher) ErrorAll(err error) + func (d *Dispatcher) ErrorOne(seq uint8, err error) error + func (d *Dispatcher) RemoveListener(seq uint8) *Listener + type EchoReq struct + Payload string + func NewEchoReq() *EchoReq + func (r *EchoReq) Msg() *NmpMsg + type EchoRsp struct + Payload string + Rc int + func NewEchoRsp() *EchoRsp + func (r *EchoRsp) Msg() *NmpMsg + type FsDownloadReq struct + Name string + Off uint32 + func NewFsDownloadReq() *FsDownloadReq + func (r *FsDownloadReq) Msg() *NmpMsg + type FsDownloadRsp struct + Data []byte + Len uint32 + Off uint32 + Rc int + func NewFsDownloadRsp() *FsDownloadRsp + func (r *FsDownloadRsp) Msg() *NmpMsg + type FsUploadReq struct + Data []byte + Len uint32 + Name string + Off uint32 + func NewFsUploadReq() *FsUploadReq + func (r *FsUploadReq) Msg() *NmpMsg + type FsUploadRsp struct + Off uint32 + Rc int + func NewFsUploadRsp() *FsUploadRsp + func (r *FsUploadRsp) Msg() *NmpMsg + type ImageEraseReq struct + func NewImageEraseReq() *ImageEraseReq + func (r *ImageEraseReq) Msg() *NmpMsg + type ImageEraseRsp struct + Rc int + func NewImageEraseRsp() *ImageEraseRsp + func (r *ImageEraseRsp) Msg() *NmpMsg + type ImageStateEntry struct + Active bool + Bootable bool + Confirmed bool + Hash []byte + Image int + Pending bool + Permanent bool + Slot int + Version string + type ImageStateReadReq struct + func NewImageStateReadReq() *ImageStateReadReq + func (r *ImageStateReadReq) Msg() *NmpMsg + type ImageStateRsp struct + Images []ImageStateEntry + Rc int + SplitStatus SplitStatus + func NewImageStateRsp() *ImageStateRsp + func (r *ImageStateRsp) Msg() *NmpMsg + type ImageStateWriteReq struct + Confirm bool + Hash []byte + func NewImageStateWriteReq() *ImageStateWriteReq + func (r *ImageStateWriteReq) Msg() *NmpMsg + type ImageUploadReq struct + Data []byte + DataSha []byte + ImageNum uint8 + Len uint32 + Off uint32 + Upgrade bool + func NewImageUploadReq() *ImageUploadReq + func NewImageUploadReqWithSeq(seq uint8) *ImageUploadReq + func (r *ImageUploadReq) Msg() *NmpMsg + type ImageUploadRsp struct + Off uint32 + Rc int + func NewImageUploadRsp() *ImageUploadRsp + func (r *ImageUploadRsp) Msg() *NmpMsg + type Listener struct + ErrChan chan error + RspChan chan NmpRsp + func NewListener() *Listener + func (nl *Listener) AfterTimeout(tmo time.Duration) <-chan time.Time + func (nl *Listener) Close() + type LogClearReq struct + func NewLogClearReq() *LogClearReq + func (r *LogClearReq) Msg() *NmpMsg + type LogClearRsp struct + Rc int + func NewLogClearRsp() *LogClearRsp + func (r *LogClearRsp) Msg() *NmpMsg + type LogEntry struct + ImgHash []byte + Index uint32 + Level uint8 + Module uint8 + Msg []byte + Timestamp int64 + Type LogEntryType + type LogEntryType int + func LogEntryTypeFromString(s string) (LogEntryType, error) + func (l *LogEntryType) UnmarshalBinary(data []byte) error + func (l LogEntryType) MarshalBinary() ([]byte, error) + func (l LogEntryType) String() string + type LogLevelListReq struct + func NewLogLevelListReq() *LogLevelListReq + func (r *LogLevelListReq) Msg() *NmpMsg + type LogLevelListRsp struct + Map map[string]int + Rc int + func NewLogLevelListRsp() *LogLevelListRsp + func (r *LogLevelListRsp) Msg() *NmpMsg + type LogListReq struct + func NewLogListReq() *LogListReq + func (r *LogListReq) Msg() *NmpMsg + type LogListRsp struct + List []string + Rc int + func NewLogListRsp() *LogListRsp + func (r *LogListRsp) Msg() *NmpMsg + type LogModuleListReq struct + func NewLogModuleListReq() *LogModuleListReq + func (r *LogModuleListReq) Msg() *NmpMsg + type LogModuleListRsp struct + Map map[string]int + Rc int + func NewLogModuleListRsp() *LogModuleListRsp + func (r *LogModuleListRsp) Msg() *NmpMsg + type LogShowLog struct + Entries []LogEntry + Name string + Type int + type LogShowReq struct + Index uint32 + Name string + Timestamp int64 + func NewLogShowReq() *LogShowReq + func (r *LogShowReq) Msg() *NmpMsg + type LogShowRsp struct + Logs []LogShowLog + NextIndex uint32 + Rc int + func NewLogShowRsp() *LogShowRsp + func (r *LogShowRsp) Msg() *NmpMsg + type MempoolStatReq struct + func NewMempoolStatReq() *MempoolStatReq + func (r *MempoolStatReq) Msg() *NmpMsg + type MempoolStatRsp struct + Mpools map[string]map[string]int + Rc int + func NewMempoolStatRsp() *MempoolStatRsp + func (r *MempoolStatRsp) Msg() *NmpMsg + type NmpBase struct + func (b *NmpBase) Hdr() *NmpHdr + func (b *NmpBase) SetHdr(h *NmpHdr) + type NmpHdr struct + Flags uint8 + Group uint16 + Id uint8 + Len uint16 + Op uint8 + Seq uint8 + func DecodeNmpHdr(data []byte) (*NmpHdr, error) + func (hdr *NmpHdr) Bytes() []byte + type NmpMsg struct + Body interface{} + Hdr NmpHdr + func MsgFromReq(r NmpReq) *NmpMsg + func NewNmpMsg() *NmpMsg + type NmpReq interface + Hdr func() *NmpHdr + Msg func() *NmpMsg + SetHdr func(hdr *NmpHdr) + type NmpRsp interface + Hdr func() *NmpHdr + Msg func() *NmpMsg + SetHdr func(msg *NmpHdr) + func DecodeRspBody(hdr *NmpHdr, body []byte) (NmpRsp, error) + type Ogi struct + Group uint16 + Id uint8 + Op uint8 + type Reassembler struct + func NewReassembler() *Reassembler + func (r *Reassembler) RxFrag(frag []byte) []byte + type ResetReq struct + func NewResetReq() *ResetReq + func (r *ResetReq) Msg() *NmpMsg + type ResetRsp struct + func NewResetRsp() *ResetRsp + func (r *ResetRsp) Msg() *NmpMsg + type RunListReq struct + func NewRunListReq() *RunListReq + func (r *RunListReq) Msg() *NmpMsg + type RunListRsp struct + List []string + Rc int + func NewRunListRsp() *RunListRsp + func (r *RunListRsp) Msg() *NmpMsg + type RunTestReq struct + Testname string + Token string + func NewRunTestReq() *RunTestReq + func (r *RunTestReq) Msg() *NmpMsg + type RunTestRsp struct + Rc int + func NewRunTestRsp() *RunTestRsp + func (r *RunTestRsp) Msg() *NmpMsg + type ShellExecReq struct + Argv []string + func NewShellExecReq() *ShellExecReq + func (r *ShellExecReq) Msg() *NmpMsg + type ShellExecRsp struct + O string + Rc int + func NewShellExecRsp() *ShellExecRsp + func (r *ShellExecRsp) Msg() *NmpMsg + type SplitStatus int + const MATCHING + const NOT_APPLICABLE + const NOT_MATCHING + func (sm SplitStatus) String() string + type StatListReq struct + func NewStatListReq() *StatListReq + func (r *StatListReq) Msg() *NmpMsg + type StatListRsp struct + List []string + Rc int + func NewStatListRsp() *StatListRsp + func (r *StatListRsp) Msg() *NmpMsg + type StatReadReq struct + Name string + func NewStatReadReq() *StatReadReq + func (r *StatReadReq) Msg() *NmpMsg + type StatReadRsp struct + Fields map[string]interface{} + Group string + Name string + Rc int + func NewStatReadRsp() *StatReadRsp + func (r *StatReadRsp) Msg() *NmpMsg + type TaskStatReq struct + func NewTaskStatReq() *TaskStatReq + func (r *TaskStatReq) Msg() *NmpMsg + type TaskStatRsp struct + Rc int + Tasks map[string]map[string]int + func NewTaskStatRsp() *TaskStatRsp + func (r *TaskStatRsp) Msg() *NmpMsg