Exemple #1
0
 def setUp(self):
     self.random_port = str(random.randint(8000,9000))
     flags = {
         'hmi_server_host': '127.0.0.1',
         'hmi_server_port': self.random_port,
         'hmi_camera_params_path': os.path.abspath(os.path.dirname(__file__)) + '/params',
     }
     env_utils.start_hmi_server(flags)
Exemple #2
0
 def server_init(self):
     flags = {
         'hmi_server_host':
         '127.0.0.1',
         'hmi_server_port':
         9898,
         'hmi_camera_params_path':
         os.path.abspath(os.path.dirname(__file__)) + '/params',
     }
     env_utils.start_hmi_server(flags)
Exemple #3
0
    def test_restore_work_state(self):
        request = hmi_collect_data_pb2.WorkStateRequest()
        request.car_work_mode = hmi_collect_data_pb2.AID_MODE
        print("Request: " + str(request))
        host_port = "127.0.0.1:" + self.random_port
        channel = grpc.insecure_channel(host_port)
        stub = hmi_grpc_api_pb2_grpc.HMIGrpcServiceStub(channel)
        response = stub.NotiWorkingState(request)
        print("Response: " + str(response))

        env_utils.stop_hmi_server()
        env_utils.start_hmi_server(self.flags)

        request = hmi_fetch_msg_pb2.FetchKeys()
        request.keys.append(hmi_fetch_msg_pb2.WORK_STATE)
        print("Request: " + str(request))
        response = stub.FetchSectionMsg(request)
        print("Response: " + str(response))
        self.assertTrue(response.code == hmi_error_code_pb2.OK, response)
        self.assertTrue(response.HasField('work_state_result'), response)
        self.assertTrue(response.work_state_result.car_work_mode == hmi_collect_data_pb2.AID_MODE, response)
Exemple #4
0
 def setUp(self):
     flags = {'hmi_server_host': '127.0.0.1'}
     env_utils.start_hmi_server(flags)
Exemple #5
0
 def setUp(self):
     flags = {
         'hmi_server_host': '127.0.0.1',
         'hmi_ultrasonic_idx_list_file': 'aaa.yaml',
     }
     env_utils.start_hmi_server(flags)
 def setUp(self):
     flags = {'hmi_server_host': '127.0.0.1'}
     env_utils.start_hmi_server(flags)
     env_utils.start_data_status_service()