Line data Source code
1 : /********************************************************************************
2 : * Copyright (c) 2026 Accenture
3 : *
4 : * This program and the accompanying materials are made available under the
5 : * terms of the Apache License Version 2.0 which is available at
6 : * https://www.apache.org/licenses/LICENSE-2.0
7 : *
8 : * SPDX-License-Identifier: Apache-2.0
9 : ********************************************************************************/
10 :
11 : #pragma once
12 :
13 : #include "someip/ISomeIpSerializable.h"
14 : #include "someip/SomeIpMessage.h"
15 :
16 : #include <ip/IPEndpoint.h>
17 :
18 : namespace someip
19 : {
20 : class ServiceHandler;
21 :
22 : class RequestContext
23 : {
24 : public:
25 : RequestContext();
26 :
27 : ::ip::IPEndpoint remoteIp;
28 : ISomeIpSerializable* pResponse;
29 : ISomeIpSerializable* pRequest;
30 : ServiceHandler* pService;
31 : void* callback;
32 : uint32_t requestId;
33 : service_id::type serviceId;
34 : uint16_t methodId;
35 : uint16_t localPort;
36 : uint8_t proto;
37 : uint8_t interfaceVersion;
38 : SomeIpMessage::MessageType requestMessageType;
39 : uint8_t operationResult;
40 : };
41 :
42 : /*
43 : * inline implementation
44 : */
45 12 : inline RequestContext::RequestContext()
46 12 : : remoteIp()
47 12 : , pResponse(nullptr)
48 12 : , pRequest(nullptr)
49 12 : , pService(nullptr)
50 12 : , callback(nullptr)
51 12 : , requestId(0U)
52 12 : , serviceId(0U)
53 12 : , methodId(0U)
54 12 : , localPort(0U)
55 12 : , proto(0U)
56 12 : , interfaceVersion(0U)
57 12 : , requestMessageType(SomeIpMessage::MessageType::EXCEPTION)
58 12 : , operationResult(0U)
59 12 : {}
60 :
61 : } // namespace someip
|