import grpc

#import radio_config_pb2
#import flowgraph_config_pb2
#import transmitter_pb2
import message_valid_pb2
import flowgraph_dispatcher_service_pb2_grpc

GRPC_SERVER_URI = "localhost:50051"

def run():
    print("Will try to send radio configuration...")
    with grpc.insecure_channel(GRPC_SERVER_URI) as channel:
        stub = flowgraph_dispatcher_service_pb2_grpc.FlowgraphDispatcherServiceStub(channel)

        msg = message_valid_pb2.MessageValid()

        response = stub.GetRadioConfigService(msg)

        print("######## Radio Config ##########")
        print(response)
        
        response = stub.GetFlowgraphConfigService(msg)

        print("######## Flowgraph Config ##########")
        print(response)
        
        response = stub.GetTransmitterService(msg)

        print("######## Transmitter Config ##########")
        print(response)
        
        response = stub.GetObservationConfigService(msg)

        print("######## Observation Config ##########")
        print(response)

if __name__ == "__main__":
    run()
