RemoteRF 0.0.6.4__tar.gz → 0.0.6.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {remoterf-0.0.6.4/src/remoteRF.egg-info → remoterf-0.0.6.6}/PKG-INFO +1 -1
  2. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/setup.py +1 -1
  3. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/drivers/adalm_pluto/pluto_remote.py +58 -33
  4. remoterf-0.0.6.6/src/remoteRF/drivers/adalm_pluto/pluto_wrapper.py +73 -0
  5. {remoterf-0.0.6.4 → remoterf-0.0.6.6/src/remoteRF.egg-info}/PKG-INFO +1 -1
  6. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF.egg-info/SOURCES.txt +2 -1
  7. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/LICENSE +0 -0
  8. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/MANIFEST.in +0 -0
  9. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/README.md +0 -0
  10. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/setup.cfg +0 -0
  11. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/__init__.py +0 -0
  12. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/__init__.py +0 -0
  13. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/grpc/__init__.py +0 -0
  14. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/grpc/grpc_pb2.py +0 -0
  15. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/grpc/grpc_pb2_grpc.py +0 -0
  16. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/utils/__init__.py +0 -0
  17. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/utils/ansi_codes.py +0 -0
  18. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/utils/api_token.py +0 -0
  19. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/utils/list_string.py +0 -0
  20. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/common/utils/process_arg.py +0 -0
  21. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/__init__.py +0 -0
  22. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/acc_login.py +0 -0
  23. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/app.py +0 -0
  24. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/__init__.py +0 -0
  25. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/ca.crt +0 -0
  26. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/ca.key +0 -0
  27. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/cert.pem +0 -0
  28. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/key.pem +0 -0
  29. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/server.crt +0 -0
  30. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/certs/server.key +0 -0
  31. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/grpc_acc.py +0 -0
  32. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/core/grpc_client.py +0 -0
  33. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/drivers/__init__.py +0 -0
  34. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF/drivers/adalm_pluto/__init__.py +0 -0
  35. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF.egg-info/dependency_links.txt +0 -0
  36. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF.egg-info/entry_points.txt +0 -0
  37. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF.egg-info/requires.txt +0 -0
  38. {remoterf-0.0.6.4 → remoterf-0.0.6.6}/src/remoteRF.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: remoteRF
3
- Version: 0.0.6.4
3
+ Version: 0.0.6.6
4
4
  Summary: A python API to remotely access signal centric hardware. Client-side only!
5
5
  Author: Ethan Ge
6
6
  Author-email: ethoGalaxy@gmail.com
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setup(
8
8
  name="remoteRF",
9
- version="0.0.6.4",
9
+ version="0.0.6.6",
10
10
  author="Ethan Ge",
11
11
  author_email="ethoGalaxy@gmail.com",
12
12
  description="A python API to remotely access signal centric hardware. Client-side only!",
@@ -2,20 +2,21 @@ from ...core.grpc_client import rpc_client
2
2
  from ...common.utils import *
3
3
  from ...common.grpc import grpc_pb2
4
4
  from ...core.grpc_client import get_tcp_calls
5
+ from .pluto_wrapper import WrapperMeta
5
6
 
6
- class rx_def:
7
- pass
7
+ # class rx_def:
8
+ # pass
8
9
 
9
- class tx_def:
10
- pass
10
+ # class tx_def:
11
+ # pass
11
12
 
12
- class rx_tx_def(rx_def, tx_def):
13
- pass
13
+ # class rx_tx_def(rx_def, tx_def):
14
+ # pass
14
15
 
15
- class ad9364(rx_tx_def):
16
- pass
16
+ # class ad9364(rx_tx_def):
17
+ # pass
17
18
 
18
- class Pluto: # client
19
+ class Pluto(metaclass=WrapperMeta): # client
19
20
 
20
21
  def __init__(self, token='', debug=False):
21
22
  self.token = token
@@ -48,99 +49,123 @@ class Pluto: # client
48
49
 
49
50
  @property
50
51
  def filter(self):
51
- return self.try_get(function_name="filter")
52
+ pass
53
+ # return self.try_get(function_name="filter")
52
54
 
53
55
  @filter.setter
54
56
  def filter(self, value):
55
- self.try_set(function_name="filter", value=grpc_pb2.Argument(int64_value=value))
57
+ pass
58
+ # self.try_set(function_name="filter", value=grpc_pb2.Argument(int64_value=value))
56
59
 
57
60
  @property
58
61
  def loopback(self):
59
- return self.try_get(function_name="loopback")
62
+ pass
63
+ # return self.try_get(function_name="loopback")
60
64
 
61
65
  @loopback.setter
62
66
  def loopback(self, value):
63
- self.try_set(function_name="loopback", value=grpc_pb2.Argument(int64_value=value))
67
+ pass
68
+ # self.try_set(function_name="loopback", value=grpc_pb2.Argument(int64_value=value))
64
69
 
65
70
  @property
66
71
  def gain_control_mode_chan0(self):
67
- return self.try_get(function_name="gain_control_mode_chan0")
72
+ pass
73
+ # return self.try_get(function_name="gain_control_mode_chan0")
68
74
 
69
75
  @gain_control_mode_chan0.setter
70
76
  def gain_control_mode_chan0(self, value):
71
- self.try_set(function_name="gain_control_mode_chan0", value=grpc_pb2.Argument(int64_value=value))
77
+ pass
78
+ # self.try_set(function_name="gain_control_mode_chan0", value=grpc_pb2.Argument(int64_value=value))
72
79
 
73
80
  @property
74
81
  def rx_hardwaregain_chan0(self):
75
- return self.try_get(function_name="rx_hardwaregain_chan0")
82
+ pass
83
+ # return self.try_get(function_name="rx_hardwaregain_chan0")
76
84
 
77
85
  @rx_hardwaregain_chan0.setter
78
86
  def rx_hardwaregain_chan0(self, value):
79
- self.try_set(function_name="rx_hardwaregain_chan0", value=grpc_pb2.Argument(int64_value=value))
87
+ pass
88
+ # self.try_set(function_name="rx_hardwaregain_chan0", value=grpc_pb2.Argument(int64_value=value))
80
89
 
81
90
  @property
82
91
  def tx_hardwaregain_chan0(self):
83
- return self.try_get(function_name="tx_hardwaregain_chan0")
92
+ pass
93
+ # return self.try_get(function_name="tx_hardwaregain_chan0")
84
94
 
85
95
  @tx_hardwaregain_chan0.setter
86
96
  def tx_hardwaregain_chan0(self, value):
87
- self.try_set(function_name="tx_hardwaregain_chan0", value=grpc_pb2.Argument(int64_value=value))
97
+ pass
98
+ # self.try_set(function_name="tx_hardwaregain_chan0", value=grpc_pb2.Argument(int64_value=value))
88
99
 
89
100
  @property
90
101
  def rx_rf_bandwidth(self):
91
- return unmap_arg(self.try_get(function_name="rx_rf_bandwidth"))
102
+ pass
103
+ # return unmap_arg(self.try_get(function_name="rx_rf_bandwidth"))
92
104
 
93
105
  @rx_rf_bandwidth.setter
94
106
  def rx_rf_bandwidth(self, value):
95
- print("Setting RX RF Bandwidth")
96
- self.try_set(function_name="rx_rf_bandwidth", value=grpc_pb2.Argument(int64_value=value))
107
+ pass
108
+ # print("Setting RX RF Bandwidth")
109
+ # self.try_set(function_name="rx_rf_bandwidth", value=grpc_pb2.Argument(int64_value=value))
97
110
 
98
111
  @property
99
112
  def tx_rf_bandwidth(self):
100
- return self.try_get(function_name="tx_rf_bandwidth")
113
+ pass
114
+ # return self.try_get(function_name="tx_rf_bandwidth")
101
115
 
102
116
  @tx_rf_bandwidth.setter
103
117
  def tx_rf_bandwidth(self, value):
104
- self.try_set(function_name="tx_rf_bandwidth", value=grpc_pb2.Argument(int64_value=value))
118
+ pass
119
+ # self.try_set(function_name="tx_rf_bandwidth", value=grpc_pb2.Argument(int64_value=value))
105
120
 
106
121
  @property
107
122
  def sample_rate(self):
108
- return self.try_get(function_name="sample_rate")
123
+ pass
124
+ # return self.try_get(function_name="sample_rate")
109
125
 
110
126
  @sample_rate.setter
111
127
  def sample_rate(self, value):
112
- self.try_set(function_name="sample_rate", value=grpc_pb2.Argument(int64_value=value))
128
+ pass
129
+ # self.try_set(function_name="sample_rate", value=grpc_pb2.Argument(int64_value=value))
113
130
 
114
131
  @property
115
132
  def rx_lo(self):
116
- return self.try_get(function_name="rx_lo").int64_value
133
+ pass
134
+ # return self.try_get(function_name="rx_lo").int64_value
117
135
 
118
136
  @rx_lo.setter
119
137
  def rx_lo(self, value):
120
- self.try_set(function_name="rx_lo", value=grpc_pb2.Argument(int64_value=value))
138
+ pass
139
+ # self.try_set(function_name="rx_lo", value=grpc_pb2.Argument(int64_value=value))
121
140
 
122
141
  @property
123
142
  def tx_lo(self):
124
- return self.try_get(function_name="tx_lo").int64_value
143
+ pass
144
+ # return self.try_get(function_name="tx_lo").int64_value
125
145
 
126
146
  @tx_lo.setter
127
147
  def tx_lo(self, value):
128
- self.try_set(function_name="tx_lo", value=grpc_pb2.Argument(int64_value=value))
148
+ pass
149
+ # self.try_set(function_name="tx_lo", value=grpc_pb2.Argument(int64_value=value))
129
150
 
130
151
  #endregion
131
152
 
132
153
  #region rx_def
133
154
 
155
+ @property
134
156
  def rx(self):
135
- return unmap_arg(self.try_get(function_name="rx"))
157
+ pass
158
+ # return unmap_arg(self.try_get(function_name="rx"))
136
159
 
137
160
  @property
138
161
  def rx_buffer_size(self):
139
- return self.try_get(function_name="rx_buffer_size").int64_value
162
+ pass
163
+ # return self.try_get(function_name="rx_buffer_size").int64_value
140
164
 
141
165
  @rx_buffer_size.setter
142
166
  def rx_buffer_size(self, value):
143
- self.try_set(function_name="rx_buffer_size", value=grpc_pb2.Argument(int64_value=value))
167
+ pass
168
+ # self.try_set(function_name="rx_buffer_size", value=grpc_pb2.Argument(int64_value=value))
144
169
 
145
170
  #endregion
146
171
 
@@ -0,0 +1,73 @@
1
+ from ...core import rpc_client
2
+ from ...common.utils.process_arg import map_arg
3
+
4
+ import inspect
5
+ from functools import wraps
6
+
7
+ # def method_wrapper(method):
8
+ # @wraps(method)
9
+ # def wrapped(self, *args, **kwargs): # No methods are present in Pluto Script
10
+ # # Access instance attributes like self.token
11
+ # # print(f"Method called: {method.__name__} with self.token: {self.token}")
12
+ # # Modify behavior as needed
13
+ # # For example, redirect the call
14
+ # # return self.try_get(function_name=method.__name__)
15
+ # return
16
+ # return wrapped
17
+
18
+ def property_wrapper(prop):
19
+ # Wrap the getter
20
+ if prop.fget:
21
+ @wraps(prop.fget)
22
+ def getter(self):
23
+ print(f"Getting property: {prop.fget.__name__} with self.token: {self.token}")
24
+ # Redirect or modify behavior here
25
+ return self.try_get(function_name=prop.fget.__name__)
26
+ else:
27
+ getter = None
28
+
29
+ # Wrap the setter
30
+ if prop.fset:
31
+ @wraps(prop.fset)
32
+ def setter(self, value):
33
+ print(f"Setting property: {prop.fset.__name__} to {value} with self.token: {self.token}")
34
+ # Redirect or modify behavior here
35
+ self.try_set(function_name=prop.fset.__name__, value=value)
36
+ else:
37
+ setter = None
38
+
39
+ # Wrap the deleter
40
+ if prop.fdel:
41
+ @wraps(prop.fdel)
42
+ def deleter(self):
43
+ print(f"Deleting property: {prop.fdel.__name__}")
44
+ # Redirect or modify behavior here
45
+ prop.fdel(self)
46
+ else:
47
+ deleter = None
48
+
49
+ return property(getter, setter, deleter)
50
+
51
+ class WrapperMeta(type):
52
+ def __new__(cls, name, bases, dct):
53
+ # Create the class object first
54
+ cls_obj = super().__new__(cls, name, bases, dct)
55
+ wrapped_methods = set()
56
+
57
+ # Iterate over the MRO to include inherited methods and properties
58
+ for base in cls_obj.__mro__:
59
+ for attr_name, attr_value in base.__dict__.items():
60
+ if attr_name in wrapped_methods or attr_name.startswith('__') and attr_name.endswith('__'):
61
+ continue
62
+
63
+ # if callable(attr_value):
64
+ # # Wrap methods
65
+ # setattr(cls_obj, attr_name, method_wrapper(attr_value))
66
+ # wrapped_methods.add(attr_name)
67
+
68
+ if isinstance(attr_value, property):
69
+ # Wrap properties
70
+ setattr(cls_obj, attr_name, property_wrapper(attr_value))
71
+ wrapped_methods.add(attr_name)
72
+
73
+ return cls_obj
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: remoteRF
3
- Version: 0.0.6.4
3
+ Version: 0.0.6.6
4
4
  Summary: A python API to remotely access signal centric hardware. Client-side only!
5
5
  Author: Ethan Ge
6
6
  Author-email: ethoGalaxy@gmail.com
@@ -32,4 +32,5 @@ src/remoteRF/core/certs/server.crt
32
32
  src/remoteRF/core/certs/server.key
33
33
  src/remoteRF/drivers/__init__.py
34
34
  src/remoteRF/drivers/adalm_pluto/__init__.py
35
- src/remoteRF/drivers/adalm_pluto/pluto_remote.py
35
+ src/remoteRF/drivers/adalm_pluto/pluto_remote.py
36
+ src/remoteRF/drivers/adalm_pluto/pluto_wrapper.py
File without changes
File without changes
File without changes
File without changes