def run(): channel = grpc.insecure_channel('localhost:50051') functional_stub = functional_api_pb2_grpc.FunctionalServiceStub(channel) network_stub = network_api_pb2_grpc.NetworkServiceStub(channel) diag_stub = diagnostics_api_pb2_grpc.DiagnosticsServiceStub(channel) print("-------------- Subscribe to signal blocking --------------") subscribe_to_signal(network_stub)
def run(): # replace localhost with the ip of where the signalbroker is running. channel = grpc.insecure_channel('localhost:50051') functional_stub = functional_api_pb2_grpc.FunctionalServiceStub(channel) network_stub = network_api_pb2_grpc.NetworkServiceStub(channel) diag_stub = diagnostics_api_pb2_grpc.DiagnosticsServiceStub(channel) # print("-------------- Subsribe to fan speed BLOCKING --------------") # subscribe_to_fan_signal(network_stub) # print("-------------- Read Diagnostics --------------") # read_diagnostics_vin(diag_stub) print("-------------- Read 01 OC Diagnostics enging speed BLOCKING --------------") read_diagnostics_engine_speed(diag_stub)
def run(): # channel = grpc.insecure_channel('192.168.1.82:50051') channel = grpc.insecure_channel("192.168.1.184:50051") functional_stub = functional_api_pb2_grpc.FunctionalServiceStub(channel) network_stub = network_api_pb2_grpc.NetworkServiceStub(channel) diag_stub = diagnostics_api_pb2_grpc.DiagnosticsServiceStub(channel) system_stub = system_api_pb2_grpc.SystemServiceStub(channel) # print("-------------- Subsribe to fan speed BLOCKING --------------") # subscribe_to_fan_signal(network_stub) print("-------------- upload folder and reload--------------") # upload_folder(system_stub, "../../../../configurations/demo-torslanda") # upload_folder(system_stub, "../../../../configurations/mountainview") upload_folder(system_stub, "../../../../configurations/vanilla-osx") reload_configuration(system_stub)
def run(): channel = grpc.insecure_channel("127.0.0.1:50051") network_stub = network_api_pb2_grpc.NetworkServiceStub(channel) diag_stub = diagnostics_api_pb2_grpc.DiagnosticsServiceStub(channel) system_stub = system_api_pb2_grpc.SystemServiceStub(channel) upload_folder(system_stub, "configuration") reload_configuration(system_stub) # print("-------------- Subsribe to fan speed BLOCKING --------------") # subscribe_to_fan_signal(network_stub) # print("-------------- Read Diagnostics --------------") # read_diagnostics_vin(diag_stub) # # print("-------------- Read Diagnostics --------------") read_diagnostics_odb(diag_stub)
def run(ip, port): """Main function, checking arguments passed to script, setting up stubs, configuration and starting Threads.""" # Setting up stubs and configuration channel = grpc.insecure_channel(ip + ":" + port) network_stub = network_api_pb2_grpc.NetworkServiceStub(channel) diag_stub = diagnostics_api_pb2_grpc.DiagnosticsServiceStub(channel) system_stub = system_api_pb2_grpc.SystemServiceStub(channel) check_license(system_stub) upload_folder(system_stub, "configuration") reload_configuration(system_stub) global signal_creator signal_creator = SignalCreator(system_stub) # print("-------------- Subsribe to fan speed BLOCKING --------------") # subscribe_to_fan_signal(network_stub) print("-------------- Read Diagnostics vin --------------") read_diagnostics_vin(diag_stub) print("-------------- Read Diagnostics BLOCKING--------------") read_diagnostics_odb(diag_stub)