updated grpc node x,y types, added new grpc session position type, grpc updated link options to use int, fixed corehandlers handling of dup, fixed corexml type handling for link options, updated mobility config types to correlate with link options

This commit is contained in:
bharnden 2019-06-08 16:56:39 -07:00
parent e2f2d9dca0
commit 191d392c46
10 changed files with 131 additions and 45 deletions

View file

@ -246,7 +246,7 @@ class CoreGrpcClient(object):
:rtype: core_pb2.SetSessionLocationResponse
:raises grpc.RpcError: when session doesn't exist
"""
position = core_pb2.Position(x=x, y=y, z=z, lat=lat, lon=lon, alt=alt)
position = core_pb2.SessionPosition(x=x, y=y, z=z, lat=lat, lon=lon, alt=alt)
request = core_pb2.SetSessionLocationRequest(session_id=session_id, position=position, scale=scale)
return self.stub.SetSessionLocation(request)

View file

@ -195,7 +195,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
session = self.get_session(request.session_id, context)
x, y, z = session.location.refxyz
lat, lon, alt = session.location.refgeo
position = core_pb2.Position(x=x, y=y, z=z, lat=lat, lon=lon, alt=alt)
position = core_pb2.SessionPosition(x=x, y=y, z=z, lat=lat, lon=lon, alt=alt)
return core_pb2.GetSessionLocationResponse(position=position, scale=session.location.refscale)
def SetSessionLocation(self, request, context):

View file

@ -324,6 +324,9 @@ class CoreHandler(socketserver.BaseRequestHandler):
per = ""
if link_data.per is not None:
per = str(link_data.per)
dup = ""
if link_data.dup is not None:
dup = str(link_data.dup)
tlv_data = structutils.pack_values(coreapi.CoreLinkTlv, [
(LinkTlvs.N1_NUMBER, link_data.node1_id),
@ -331,7 +334,7 @@ class CoreHandler(socketserver.BaseRequestHandler):
(LinkTlvs.DELAY, link_data.delay),
(LinkTlvs.BANDWIDTH, link_data.bandwidth),
(LinkTlvs.PER, per),
(LinkTlvs.DUP, link_data.dup),
(LinkTlvs.DUP, dup),
(LinkTlvs.JITTER, link_data.jitter),
(LinkTlvs.MER, link_data.mer),
(LinkTlvs.BURST, link_data.burst),