pygui: fixed issue with changes to protobuf files for getting emane model configs on a session
This commit is contained in:
		
							parent
							
								
									858e771efd
								
							
						
					
					
						commit
						fe36d28522
					
				
					 4 changed files with 14 additions and 5 deletions
				
			
		|  | @ -10,7 +10,7 @@ from core import utils | |||
| from core.api.grpc import common_pb2, core_pb2 | ||||
| from core.api.grpc.common_pb2 import MappedConfig | ||||
| from core.api.grpc.configservices_pb2 import ConfigServiceConfig | ||||
| from core.api.grpc.emane_pb2 import EmaneModelConfig | ||||
| from core.api.grpc.emane_pb2 import GetEmaneModelConfig | ||||
| from core.api.grpc.services_pb2 import ( | ||||
|     NodeServiceConfig, | ||||
|     NodeServiceData, | ||||
|  | @ -547,7 +547,7 @@ def get_nem_id( | |||
|     return nem_id | ||||
| 
 | ||||
| 
 | ||||
| def get_emane_model_configs(session: Session) -> List[EmaneModelConfig]: | ||||
| def get_emane_model_configs(session: Session) -> List[GetEmaneModelConfig]: | ||||
|     configs = [] | ||||
|     for _id in session.emane.node_configurations: | ||||
|         if _id == -1: | ||||
|  | @ -558,7 +558,7 @@ def get_emane_model_configs(session: Session) -> List[EmaneModelConfig]: | |||
|             current_config = session.emane.get_model_config(_id, model_name) | ||||
|             config = get_config_options(current_config, model) | ||||
|             node_id, iface_id = parse_emane_model_id(_id) | ||||
|             model_config = EmaneModelConfig( | ||||
|             model_config = GetEmaneModelConfig( | ||||
|                 node_id=node_id, model=model_name, iface_id=iface_id, config=config | ||||
|             ) | ||||
|             configs.append(model_config) | ||||
|  |  | |||
|  | @ -404,6 +404,8 @@ class CoreClient: | |||
|             self.app.show_grpc_exception("New Session Error", e) | ||||
| 
 | ||||
|     def delete_session(self, session_id: int = None) -> None: | ||||
|         if session_id is None and not self.session: | ||||
|             return | ||||
|         if session_id is None: | ||||
|             session_id = self.session.id | ||||
|         try: | ||||
|  |  | |||
|  | @ -720,7 +720,7 @@ message Session { | |||
|     repeated Hook hooks = 9; | ||||
|     repeated string emane_models = 10; | ||||
|     map<string, common.ConfigOption> emane_config = 11; | ||||
|     repeated emane.EmaneModelConfig emane_model_configs = 12; | ||||
|     repeated emane.GetEmaneModelConfig emane_model_configs = 12; | ||||
|     map<int32, common.MappedConfig> wlan_configs = 13; | ||||
|     repeated services.NodeServiceConfig service_configs = 14; | ||||
|     repeated configservices.ConfigServiceConfig config_service_configs = 15; | ||||
|  |  | |||
|  | @ -53,8 +53,15 @@ message GetEmaneModelConfigsRequest { | |||
|     int32 session_id = 1; | ||||
| } | ||||
| 
 | ||||
| message GetEmaneModelConfig { | ||||
|     int32 node_id = 1; | ||||
|     string model = 2; | ||||
|     int32 iface_id = 3; | ||||
|     map<string, common.ConfigOption> config = 4; | ||||
| } | ||||
| 
 | ||||
| message GetEmaneModelConfigsResponse { | ||||
|     repeated EmaneModelConfig configs = 1; | ||||
|     repeated GetEmaneModelConfig configs = 1; | ||||
| } | ||||
| 
 | ||||
| message GetEmaneEventChannelRequest { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue