tree: 7cfbc8cb495087c4ce4099bb77820fa11f90983a [path history] [tgz]
  1. bledefs/
  2. example/
  3. lora/
  4. mgmt/
  5. mtech_lora/
  6. nmble/
  7. nmcoap/
  8. nmp/
  9. nmserial/
  10. nmxutil/
  11. omp/
  12. sesn/
  13. task/
  14. udp/
  15. xact/
  16. xport/
  17. build-examples.sh
  18. nmxact
  19. README.md
versions/v1_4_0/mynewt-newtmgr/nmxact/README.md

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