Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
maiconkist committed Apr 4, 2019
1 parent 712ebbd commit 2dfd9fb
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 105 deletions.
26 changes: 16 additions & 10 deletions app/slice_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def main():
# with the server using the same ID (1 and 2), and them releasing the resources allocated.
# We can then allocate new resources from this python without impacting the slices.

# We put the IP of the machine executing this script
client1 = hydra.hydra_client("192.168.5.70", 5000, 1, True)


# We put the IP of the machine running the UE
ue1 = xmlrpclib.ServerProxy("http://192.168.5.78:8080")

if client1.check_connection(3) == "":
Expand All @@ -86,23 +86,29 @@ def main():
slice1.allocate_tx(2.43e9 - 300e3, 400e3)
slice1.allocate_rx(2.43e9 + 3e6 - 300e3, 400e3)


if (False):
client2 = hydra.hydra_client("192.168.5.81", 5000, 2)
if (True):
# We put the IP of the machine executing this script
client2 = hydra.hydra_client("192.168.5.70", 5000, 2, True)
# We put the IP of the machine running the UE
ue2 = xmlrpclib.ServerProxy("http://192.168.5.81:8080")

if client2.check_connection(3) == "":
print("client2 could not connect to server")
sys.exit(1)
slice2 = Slice( client2, ue2)
slice2.allocate_tx(2.43e9 + 400e3, 200e3)
slice2.allocate_rx(2.43e9 + 3e6 + 300e3, 200e3)
slice2.allocate_tx(2.43e9 + 200e3, 200e3)
slice2.allocate_rx(2.43e9 + 3e6 + 200e3, 200e3)


## YOUR CODE HERE



## YOUR CODE HERE
## YOUR CODE HERE
## YOUR CODE HERE
## YOUR CODE HERE
## YOUR CODE HERE
## YOUR CODE HERE
## YOUR CODE HERE
## YOUR CODE HERE
print("Press CTRL-C to quit")
while True:
time.sleep(1)
Expand Down
94 changes: 86 additions & 8 deletions grc_blocks/app/ansible_hydra_vr2_rx.grc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</param>
<param>
<key>generate_options</key>
<value>qt_gui</value>
<value>no_gui</value>
</param>
<param>
<key>hier_block_src_path</key>
Expand Down Expand Up @@ -93,7 +93,7 @@
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>0</value>
</param>
<param>
<key>_coordinate</key>
Expand Down Expand Up @@ -156,7 +156,7 @@
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>0</value>
</param>
<param>
<key>_coordinate</key>
Expand Down Expand Up @@ -207,6 +207,49 @@
<value>counter_slider</value>
</param>
</block>
<block>
<key>parameter</key>
<param>
<key>alias</key>
<value></value>
</param>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(632, 96)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>ansibleIP</value>
</param>
<param>
<key>label</key>
<value></value>
</param>
<param>
<key>short_id</key>
<value></value>
</param>
<param>
<key>type</key>
<value>string</value>
</param>
<param>
<key>value</key>
<value>192.168.5.81</value>
</param>
</block>
<block>
<key>blocks_message_debug</key>
<param>
Expand Down Expand Up @@ -765,7 +808,7 @@
</param>
<param>
<key>_enabled</key>
<value>0</value>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
Expand Down Expand Up @@ -808,7 +851,7 @@
</param>
<param>
<key>_enabled</key>
<value>0</value>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
Expand Down Expand Up @@ -836,7 +879,7 @@
</param>
<param>
<key>value</key>
<value>0.03</value>
<value>0.04</value>
</param>
</block>
<block>
Expand Down Expand Up @@ -3060,7 +3103,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(432, 100)</value>
<value>(432, 80)</value>
</param>
<param>
<key>_rotation</key>
Expand Down Expand Up @@ -3103,7 +3146,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(536, 100)</value>
<value>(536, 80)</value>
</param>
<param>
<key>_rotation</key>
Expand All @@ -3130,6 +3173,41 @@
<value>200e3</value>
</param>
</block>
<block>
<key>xmlrpc_server</key>
<param>
<key>addr</key>
<value>ansibleIP</value>
</param>
<param>
<key>alias</key>
<value></value>
</param>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(160, 96)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>xmlrpc_server_0</value>
</param>
<param>
<key>port</key>
<value>8080</value>
</param>
</block>
<connection>
<source_block_id>blocks_multiply_const_vxx_0_0</source_block_id>
<sink_block_id>uhd_usrp_sink_0</sink_block_id>
Expand Down
Loading

0 comments on commit 2dfd9fb

Please sign in to comment.