1# Netsim python gRPC library
2
3This contains a python library to interact with Netsim gRPC frontend service
4
5## Development
6
7If you wish to do development you can create a virtual environment and
8generate python files from .proto files by running:
9
10     . ./configure.sh
11
12## Usage
13
14NetsimClient() is the Netsim gRPC Frontend Client Service connecting to netsim daemon.
15Users should use a NetsimClient to interact with netsim daemon by calling the provided APIs.
16
17```python
18from netsim import netsim
19
20netsim_client = netsim.NetsimClient()
21devices = netsim_client.get_devices()
22```
23
24The currently supported APIs include:
25- `get_version()`: Get the version of the netsim daemon.
26- `get_devices()`: Get detailed information for all devices connected to netsim daemon.
27- `set_position()`: Set the position and/or orientation of the specified device.
28- `set_radio()`: Set the specified radio chip's state of the specified device.
29- `reset()`: Reset all devices.
30
31## Adding dependencies
32
33Configure will use the local python interpreter, which does not
34have TLS support, so all the package must be made available locally!
35
36If you need to add a package, make the source package available under the
37repo directory. The easiest way to do this is:
38
39     pip3 install pip2pi
40     pip3 download  --no-binary ":all:"  my-package=1.2.3 -d repo
41     dir2pi repo