ListDevices returns the list of devices associated with a Session.
()
| 114 | |
| 115 | // ListDevices returns the list of devices associated with a Session. |
| 116 | func (s *Session) ListDevices() ([]Device, error) { |
| 117 | status := newStatus() |
| 118 | devicesList := C.TF_SessionListDevices(s.c, status.c) |
| 119 | if err := status.Err(); err != nil { |
| 120 | return nil, fmt.Errorf("SessionListDevices() failed: %v", err) |
| 121 | } |
| 122 | defer C.TF_DeleteDeviceList(devicesList) |
| 123 | return deviceSliceFromDeviceList(devicesList) |
| 124 | } |
| 125 | |
| 126 | // Run the graph with the associated session starting with the supplied feeds |
| 127 | // to compute the value of the requested fetches. Runs, but does not return |