diff --git a/core/src/supported_message.rs b/core/src/supported_message.rs index 907df55aa..5f2be25de 100644 --- a/core/src/supported_message.rs +++ b/core/src/supported_message.rs @@ -105,6 +105,7 @@ impl SupportedMessage { SupportedMessage::GetEndpointsRequest(_) => true, SupportedMessage::FindServersRequest(_) => true, SupportedMessage::RegisterServerRequest(_) => true, + SupportedMessage::RegisterServer2Request(_) => true, SupportedMessage::CreateSessionRequest(_) => true, SupportedMessage::CloseSessionRequest(_) => true, SupportedMessage::CancelRequest(_) => true, @@ -146,6 +147,7 @@ impl SupportedMessage { SupportedMessage::GetEndpointsRequest(r) => &r.request_header, SupportedMessage::FindServersRequest(r) => &r.request_header, SupportedMessage::RegisterServerRequest(r) => &r.request_header, + SupportedMessage::RegisterServer2Request(r) => &r.request_header, SupportedMessage::CreateSessionRequest(r) => &r.request_header, SupportedMessage::CloseSessionRequest(r) => &r.request_header, SupportedMessage::CancelRequest(r) => &r.request_header, @@ -187,6 +189,7 @@ impl SupportedMessage { SupportedMessage::GetEndpointsResponse(_) => true, SupportedMessage::FindServersResponse(_) => true, SupportedMessage::RegisterServerResponse(_) => true, + SupportedMessage::RegisterServer2Response(_) => true, SupportedMessage::CreateSessionResponse(_) => true, SupportedMessage::CloseSessionResponse(_) => true, SupportedMessage::CancelResponse(_) => true, @@ -228,6 +231,7 @@ impl SupportedMessage { SupportedMessage::GetEndpointsResponse(r) => &r.response_header, SupportedMessage::FindServersResponse(r) => &r.response_header, SupportedMessage::RegisterServerResponse(r) => &r.response_header, + SupportedMessage::RegisterServer2Response(r) => &r.response_header, SupportedMessage::CreateSessionResponse(r) => &r.response_header, SupportedMessage::CloseSessionResponse(r) => &r.response_header, SupportedMessage::CancelResponse(r) => &r.response_header, @@ -298,6 +302,12 @@ impl SupportedMessage { ObjectId::RegisterServerResponse_Encoding_DefaultBinary => { RegisterServerResponse::decode(stream, decoding_limits)?.into() } + ObjectId::RegisterServer2Request_Encoding_DefaultBinary => { + RegisterServer2Request::decode(stream, decoding_limits)?.into() + } + ObjectId::RegisterServer2Response_Encoding_DefaultBinary => { + RegisterServer2Response::decode(stream, decoding_limits)?.into() + } ObjectId::CreateSessionRequest_Encoding_DefaultBinary => { CreateSessionRequest::decode(stream, decoding_limits)?.into() } @@ -500,6 +510,8 @@ supported_messages_enum![ FindServersResponse, RegisterServerRequest, RegisterServerResponse, + RegisterServer2Request, + RegisterServer2Response, CreateSessionRequest, CreateSessionResponse, CloseSessionRequest, diff --git a/docs/compatibility.md b/docs/compatibility.md index a825dafb8..90e1b3353 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -20,6 +20,9 @@ The following services are supported in the server: * Discovery service set * GetEndpoints + * FindServers - stub that returns BadNotSupported + * RegisterServer - stub that returns BadNotSupported + * RegisterServer2 - stub that returns BadNotSupported * Attribute service set * Read diff --git a/server/src/services/discovery.rs b/server/src/services/discovery.rs index 3afaafea3..12f790252 100644 --- a/server/src/services/discovery.rs +++ b/server/src/services/discovery.rs @@ -36,6 +36,14 @@ impl DiscoveryService { }.into() } + pub fn register_server(&self, _server_state: Arc>, request: &RegisterServerRequest) -> SupportedMessage { + self.service_fault(&request.request_header, StatusCode::BadNotSupported) + } + + pub fn register_server2(&self, _server_state: Arc>, request: &RegisterServer2Request) -> SupportedMessage { + self.service_fault(&request.request_header, StatusCode::BadNotSupported) + } + pub fn find_servers(&self, _server_state: Arc>, request: &FindServersRequest) -> SupportedMessage { self.service_fault(&request.request_header, StatusCode::BadNotSupported) } diff --git a/server/src/services/message_handler.rs b/server/src/services/message_handler.rs index eac68bb23..0abf34ca6 100644 --- a/server/src/services/message_handler.rs +++ b/server/src/services/message_handler.rs @@ -90,6 +90,15 @@ impl MessageHandler { SupportedMessage::GetEndpointsRequest(request) => { Some(self.discovery_service.get_endpoints(server_state, request)) } + + SupportedMessage::RegisterServerRequest(request) => { + Some(self.discovery_service.register_server(server_state, request)) + } + + SupportedMessage::RegisterServer2Request(request) => { + Some(self.discovery_service.register_server2(server_state, request)) + } + SupportedMessage::FindServersRequest(request) => { Some(self.discovery_service.find_servers(server_state, request)) } diff --git a/tools/schema/gen_supported_message.js b/tools/schema/gen_supported_message.js index 2de62c286..01c2975a9 100644 --- a/tools/schema/gen_supported_message.js +++ b/tools/schema/gen_supported_message.js @@ -209,6 +209,7 @@ generate_supported_message([ "GetEndpointsRequest", "GetEndpointsResponse", "FindServersRequest", "FindServersResponse", "RegisterServerRequest", "RegisterServerResponse", + "RegisterServer2Request", "RegisterServer2Response", // Session service "CreateSessionRequest", "CreateSessionResponse", "CloseSessionRequest", "CloseSessionResponse",