|
| 1 | +# SOMEIP |
| 2 | + |
| 3 | +The **someip** input plugin is used to interact with a SOME/IP communication network to subscribe to events and to exchange request/response with SOME/IP services. |
| 4 | + |
| 5 | +This plugin uses the [vsomeip library](https://github.com/COVESA/vsomeip) \(built-in dependency\). |
| 6 | + |
| 7 | +## Configuration Parameters |
| 8 | + |
| 9 | +The plugin supports the following configuration parameters: |
| 10 | + |
| 11 | +| Key | Description | |
| 12 | +| ------------ | ----------- | |
| 13 | +| Event | SOME/IP event to subscribe to. The configuration can have multiple events, one on each line. An event is identified by a comma separated list with, "_service ID_, _event ID_, _event group ID 1_, _event group ID 2_, ...". The Event must include at least one _event group ID_, but can be associated with multiple. | |
| 14 | +| RPC | SOME/IP request to send when service is available. The configuration can have multiple RPCs, one on each line. An RPC is composed as a comma separated list with, "_service ID_, _service instance_, _method ID_, _request payload_". The request payload should be a should be base64 encoded | |
| 15 | + |
| 16 | +## Getting Started |
| 17 | + |
| 18 | +In order to subscribe to SOME/IP events or send request/receive SOME/IP response, you can run the plugin from the command line or through the configuration file: |
| 19 | + |
| 20 | +### Command Line |
| 21 | + |
| 22 | +The **someip** plugin can be enabled with options from the command line: |
| 23 | + |
| 24 | +```bash |
| 25 | +$ ./fluent-bit -i someip -p Event=4,1,32768,1 -o stdout |
| 26 | +``` |
| 27 | + |
| 28 | +### Configuration File |
| 29 | + |
| 30 | +In your main configuration file append the following _Input_ & _Output_ sections: |
| 31 | + |
| 32 | +```text |
| 33 | +[INPUT] |
| 34 | + Name someip |
| 35 | + Tag in.someip |
| 36 | +
|
| 37 | + Event 4,1,32768,1 |
| 38 | + Event 4,1,32769,2 |
| 39 | + RPC 4,1,1,CgAQAw== |
| 40 | +
|
| 41 | +[OUTPUT] |
| 42 | + Name stdout |
| 43 | +``` |
| 44 | + |
| 45 | +## Testing |
| 46 | + |
| 47 | +Once Fluent Bit is running, you can send some SOME/IP messages using the SOME/IP test service provided. |
| 48 | + |
| 49 | +```bash |
| 50 | +$ bin/someip_test_service |
| 51 | +2025-02-06 22:18:06.211337 [info] Parsed vsomeip configuration in 0ms |
| 52 | +... |
| 53 | +Sending event with message Event Number 1 |
| 54 | +Sent notification for service 4, event 32768 |
| 55 | +Sending event with message Event Number 2 |
| 56 | +Sent notification for service 4, event 32768 |
| 57 | +``` |
| 58 | + |
| 59 | +In [Fluent Bit](http://fluentbit.io) we should see the following output: |
| 60 | + |
| 61 | +```bash |
| 62 | +$ bin/fluent-bit -i someip -p Event=4,1,32768,1 -o stdout |
| 63 | +Fluent Bit v3.2.0 |
| 64 | +* Copyright (C) 2015-2024 The Fluent Bit Authors |
| 65 | +* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd |
| 66 | +* https://fluentbit.io |
| 67 | + |
| 68 | +______ _ _ ______ _ _ _____ _____ |
| 69 | +| ___| | | | | ___ (_) | |____ |/ __ \ |
| 70 | +| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __ / /`' / /' |
| 71 | +| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / \ \ / / |
| 72 | +| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /.___/ /./ /___ |
| 73 | +\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ \____(_)_____/ |
| 74 | +
|
| 75 | +
|
| 76 | +[2025/02/06 22:12:23] [ info] [fluent bit] version=3.2.0, commit=239b46be20, pid=51044 |
| 77 | +[2025/02/06 22:12:23] [ info] [storage] ver=1.5.2, type=memory, sync=normal, checksum=off, max_chunks_up=128 |
| 78 | +[2025/02/06 22:12:23] [ info] [simd ] disabled |
| 79 | +[2025/02/06 22:12:23] [ info] [cmetrics] version=0.9.8 |
| 80 | +[2025/02/06 22:12:23] [ info] [ctraces ] version=0.5.7 |
| 81 | +[2025/02/06 22:12:23] [ info] [input:someip:someip.0] initializing |
| 82 | +[2025/02/06 22:12:23] [ info] [input:someip:someip.0] storage_strategy='memory' (memory only) |
| 83 | +[2025/02/06 22:12:23] [ info] [input:someip:someip.0] Received 1 configured events |
| 84 | +[2025/02/06 22:12:23] [ info] [input:someip:someip.0] No RPC configured. |
| 85 | +... |
| 86 | +2025-02-06 22:18:03.130557 [info] vSomeIP 3.5.1 | (default) |
| 87 | +2025-02-06 22:18:06.223714 [info] Application/Client 0101 is registering. |
| 88 | +2025-02-06 22:18:06.225581 [info] Client [100] is connecting to [101] at /tmp/vsomeip-101 endpoint > 0x79a50c000e30 |
| 89 | +2025-02-06 22:18:06.230477 [info] REGISTERED_ACK(0101) |
| 90 | +2025-02-06 22:18:06.236103 [info] Port configuration missing for [4.1]. Service is internal. |
| 91 | +2025-02-06 22:18:06.236923 [info] OFFER(0101): [0004.0001:0.0] (true) |
| 92 | +2025-02-06 22:18:06.240237 [info] SUBSCRIBE ACK(0101): [0004.0001.0001.ffff] |
| 93 | +Received message for service 4 event = 32768 |
| 94 | +[0] someip.0: [[1738880288.622425534, {}], {"record type"=>"event", "service"=>4, "instance"=>1, "event"=>32768, "payload"=>"RXZlbnQgTnVtYmVyIDE="}] |
| 95 | +Received message for service 4 event = 32768 |
| 96 | +[0] someip.0: [[1738880290.622781511, {}], {"record type"=>"event", "service"=>4, "instance"=>1, "event"=>32768, "payload"=>"RXZlbnQgTnVtYmVyIDI="}] |
| 97 | +... |
| 98 | +``` |
| 99 | +
|
| 100 | +
|
0 commit comments