nmxact/

directory
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0

README

nmxact

Summary

nmxact (newtmgr transact) is a Go library which enables remote management of Mynewt devices. Management is performed via the following supported protocols:

* Newtmgr protocol (NMP)
* OIC management protocol (OMP)

nmxact can communicate with Mynewt devices via the following transports:

* Bluetooth Low Energy (BLE)
* UART 

Concepts

xport.Xport: Implements a low-level transport. An Xport instance performs the transmitting and receiving of raw data.

sesn.Sesn: Represents a communication session with a specific peer. The particulars vary according to protocol and transport. Several Sesn instances can use the same Xport.

xact.Cmd: Represents a high-level command. Executing a Cmd typically results in the exchange of one or more request response pairs with the target peer. Cmd execution blocks until completion. Execute a command with the Run() member function; cancel a running command from another thread with the Abort() member function.

xact.Result: The outcome of executing a Cmd. Retrieve the status code in the form of an NMP error code with the Status() member function. Specific implementors of the xact.Result interface typically contain all the management responses received during command execution.

Examples

nmxact comes with the following simple examples:

  • BLE, plain: nmxact/example/ble_plain/ble_plain.go
  • serial, plain: nmxact/example/ble_plain/serial_plain.go

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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