-
Notifications
You must be signed in to change notification settings - Fork 33
feat(someip): add server/provider side (offer services, answer RPC, publish events) #913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kirkbrauer
wants to merge
3
commits into
main
Choose a base branch
from
feature/someip-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
opensomeip 0.1.5 python Message class fields interface_version message_type defaults💡 Result:
In the opensomeip 0.1.5 library, the Message class is defined as a dataclass within the opensomeip.message module [1][2]. While specific default values for the interface_version and message_type fields are not explicitly documented in the public summary, they are standard components of the SOME/IP header [3]. It is important to distinguish the library opensomeip (v0.1.5) from other Python packages such as pysomeip [4][5]. The opensomeip library is primarily a Python wrapper/interface for a C++17 implementation [6][7]. For the SOME/IP protocol generally, these fields follow the specification [3]: - interface_version: An 8-bit field representing the Major Version of the Service Interface [3]. - message_type: An 8-bit field used to differentiate message types (e.g., REQUEST, RESPONSE, ERROR) [3]. If you are programmatically inspecting the opensomeip 0.1.5 Message dataclass, you can verify the default values in your local environment using the following Python snippet: import dataclasses from opensomeip.message import Message print(dataclasses.field_defaults(Message)) If you find that the opensomeip package does not expose these fields directly in the Python dataclass constructor due to its underlying C++ architecture, you may need to interface with the RpcClient or MessageId objects provided by the library to set these headers [1][2].
Citations:
🏁 Script executed:
Repository: jumpstarter-dev/jumpstarter
Length of output: 7080
🏁 Script executed:
Repository: jumpstarter-dev/jumpstarter
Length of output: 7823
🌐 Web query:
vtz opensomeip 0.1.5 Message source interface_version message_type💡 Result:
The opensomeip library (v0.1.5) provides Python bindings for the open-source C++17 implementation of the Scalable service-Oriented MiddlewarE over IP (SOME/IP) protocol [1][2]. In the context of the SOME/IP protocol, which this library implements, the fields interface_version and message_type are standard components of the SOME/IP header [3][4]: 1. Interface Version: This is an 8-bit field representing the Major Version of the service interface [3][4]. It is used to manage service definitions, detect mismatches, and allow debugging tools to identify the specific interface version in use [4]. 2. Message Type: This is an 8-bit field used to identify the type of message being transmitted [3][4]. Common values include: - 0x00: REQUEST (expects a response) [4] - 0x01: REQUEST_NO_RETURN (fire-and-forget) [4] - 0x02: NOTIFICATION (event notification) [4] - 0x80: RESPONSE (a response message) [4] - 0x81: ERROR (an error response) [4] Additionally, the third-highest bit of the Message Type (0x20) acts as a TP-Flag, which, when set, indicates that the message is a segment for the SOME/IP-TP (Transport Protocol) [3]. For specific implementation details within the opensomeip library, you should refer to the official documentation and source code hosted at the project's repository [1][2].
Citations:
🌐 Web query:
vtz opensomeip 0.1.5 Message __init__ Python dataclass source💡 Result:
In the opensomeip Python package (v0.1.5), the Message class is implemented as a Python dataclass within the opensomeip.message module [1][2]. As a dataclass, its structure and initialization rely on standard Python dataclass mechanics [1]. While the exact source code for the init method is automatically generated by the
@dataclassdecorator at runtime, the class is defined to hold SOME/IP header fields and the message payload [1]. This design is part of the project's goal to provide a "Pythonic" API that utilizes plain Python objects rather than opaque C++ wrappers for its public-facing types [1][2]. To interact with this class in your code, you can import it as follows: from opensomeip.message import Message Since it is a dataclass, you initialize it by passing the required fields directly to the constructor (e.g., Message(message_id=..., request_id=...,...)) [1]. You can verify the specific fields available by inspecting the Message class definition in the opensomeip/message.py file within the source repository [3].Citations:
🏁 Script executed:
Repository: jumpstarter-dev/jumpstarter
Length of output: 246
Set SOME/IP response headers for the loopback request.
OsipMessageis created with onlymessage_id,request_idandpayload, butSomeIp._make_method_handlerreadsrequest.interface_versionand passesrequest.message_typewhen building the response. Set an explicitinterface_versionandmessage_typeso this path does not rely on undefined defaults.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai Can you fix this for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 6177
🏁 Script executed:
Length of output: 470
🏁 Script executed:
Length of output: 1225
@kirkbrauer, the change is not present in the current branch.LoopbackOsipClient.callstill omits both header arguments.Apply this update:
Validation is inconclusive because
makeis unavailable in this environment. Run the required package checks in a development environment that has the project toolchain.🧬 Code Graph Analysis Results
driver.pyregister_eventstores event-to-event-group mappings and delegates registration to the SOME/IP server;publish_eventconverts hexadecimal payload data to bytes and publishes by event ID.set_fieldconverts hexadecimal payload data to bytes and delegates field updates to the SOME/IP server.service_idis accepted but unused.driver_test.pystart/stoptoggle state;offer/stop_offermanage offered services;offered_servicesexposes service metadata;register_method,register_event,publish_event, andset_fieldrecord or store server operations.client.pySomeIpPayloadbefore invoking the corresponding RPC.You are interacting with an AI system.