Expand description
§RecentIP
An async SOME/IP protocol implementation for tokio.
§Quick Start
use recentip::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let runtime = recentip::configure().start().await?;
// Client: find and call a remote service
let proxy = runtime.find(0x1234u16).await?;
let response = proxy.call(MethodId::new(1).unwrap(), b"").await?;
// Server: offer a service
let mut offering = runtime.offer(0x5678u16, InstanceId::Id(1))
.udp().start().await?;
while let Some(event) = offering.next().await {
// Handle requests...
}
Ok(())
}§Configuration
use recentip::prelude::*;
let someip = recentip::configure()
.preferred_transport(Transport::Tcp) // Prefer TCP when service offers both
.magic_cookies(true) // Enable Magic Cookies for debugging
.offer_ttl(3) // Service offer TTL in seconds
.start().await?;§API Overview
| Type | Role |
|---|---|
SomeIp | Central coordinator, owns sockets |
OfferedService | Client proxy to remote service |
ServiceOffering | Server handle for offered service |
SubscriptionBuilder | Build subscription to eventgroups |
Subscription | Receive events from eventgroups |
Responder | Reply to incoming RPC request |
§Learn More
examples— Complete guides: RPC, Pub/Sub, Transport, Monitoringprelude— Common importscompliance— Spec traceability reportinternals— Contributor documentation (architecture, internals)
Re-exports§
pub use builder::SomeIpBuilder;pub use handles::OfferBuilder;pub use handles::SomeIp;pub use config::MethodConfig;pub use config::RuntimeConfig;pub use config::Transport;pub use handles::EventBuilder;pub use handles::EventHandle;pub use handles::FindBuilder;pub use handles::OfferedService;pub use handles::Responder;pub use handles::ServiceEvent;pub use handles::ServiceOffering;pub use handles::Subscription;pub use handles::SubscriptionBuilder;pub use error::*;
Modules§
- builder
- Builder for configuring and starting SOME/IP runtimes.
- compliance
- Specification Compliance Documentation
- config
- SOME/IP Configuration Types
- error
- Error Types
- examples
- Examples
- handles
- Handle Types for SOME/IP Communication
- internals
- Internals
- net
- Network Abstraction Layer
- prelude
- tcp
- TCP Connection Management
- wire
- Wire format parsing for SOME/IP headers and messages. Exposed for testing and interoperability verification.
Structs§
- Client
Info - Information about a client (for server-side)
- Event
- Specific event received from a subscription (aka Notify message or Notification)
- EventId
- Event identifier (high bit must be set: 0x8000-0xFFFE)
- Eventgroup
Id - Eventgroup identifier
- Method
Id - Method identifier
- Minor
Version - Minor version of a service interface
- Response
- Response from a method call
- Service
Id - Service identifier (0x0001-0xFFFE valid, 0x0000 and 0xFFFF reserved)
Enums§
- Application
Error - Error codes that applications can send in response to method calls.
- Instance
Id - Instance identifier - can be a specific ID or Any (wildcard)
- Major
Version - Major version of a service interface - can be exact or wildcard (Any)
- Return
Code - SOME/IP return codes (for parsing received responses).
- SdEvent
- Service Discovery event notification
Functions§
- configure
- Configure and start a SOME/IP runtime.