Skip to content

Commit

Permalink
Implemented static UDP & TCP routing.
Browse files Browse the repository at this point in the history
Added configuration files for testing TCP/UDP communication.
Replaced buffer queue handling by passing shared pointer to avoid buffer
overwrites.
Extended clients sample: Sending is now done in an extra thread as
sleeping in a callback is a bad idea if the client hosts the routing
manager ;-).

TODO: Re-enable Magic Cookies for TCP
	  Finalitze Service Discovery
  • Loading branch information
lutzbichler committed Jul 14, 2014
1 parent 3e8509d commit ecd8282
Show file tree
Hide file tree
Showing 45 changed files with 839 additions and 536 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/build/*
/build*/*
/.settings
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ add_library(vsomeip-sd SHARED ${vsomeip-sd_SRC})
target_link_libraries(vsomeip-sd vsomeip ${Boost_LIBRARIES} rt ${DL_LIBRARY})

# Executables
add_executable(configuration-test implementation/test/configuration-test.cpp)
add_executable(configuration-test test/configuration-test.cpp)
target_link_libraries(configuration-test vsomeip ${Boost_LIBRARIES} ${DL_LIBRARY})

add_executable(client-sample implementation/examples/client-sample.cpp)
add_executable(client-sample examples/client-sample.cpp)
target_link_libraries(client-sample vsomeip ${Boost_LIBRARIES} ${DL_LIBRARY})

add_executable(service-sample implementation/examples/service-sample.cpp)
add_executable(service-sample examples/service-sample.cpp)
target_link_libraries(service-sample vsomeip ${Boost_LIBRARIES} ${DL_LIBRARY})

###################################################################################################
Expand Down
53 changes: 53 additions & 0 deletions config/vsomeip-tcp-client.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- vsomeip test configuration file -->
<someip>
<address>192.168.56.101</address>
<logging>
<level>trace</level>
<console>true</console>
<file>
<enable>false</enable>
<path>/tmp/vsomeip.log</path>
</file>
<dlt>false</dlt>
</logging>
<services>
<servicegroup>
<name>remote</name>
<address>192.168.56.102</address>
<service>
<service-id>0x1234</service-id>
<instance-id>0x5678</instance-id>
<ports>
<reliable>30509</reliable>
</ports>
</service>
</servicegroup>
</services>
<routing>
<host>client-sample</host>
</routing>
<service-discovery>
<enabled>false</enabled>
<protocol>udp</protocol>
<address>224.244.224.245</address>
<port>30490</port>
</service-discovery>
<applications>
<application>
<name>client-sample</name>
<id>0x1343</id>
</application>
<application>
<name>second-client-sample</name>
<id>0x1344</id>
</application>
<application>
<name>third-client-sample</name>
<id>0x1345</id>
</application>
<application>
<name>fourth-client-sample</name>
<id>0x1346</id>
</application>
</applications>
</someip>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<service-id>0x1234</service-id>
<instance-id>0x5678</instance-id>
<ports>
<reliable>30507</reliable>
<reliable>30509</reliable>
</ports>
</service>
</servicegroup>
Expand Down
11 changes: 9 additions & 2 deletions config/vsomeip-client.xml → config/vsomeip-udp-client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</routing>
<service-discovery>
<enabled>false</enabled>
<host>client-sample</host>
<protocol>udp</protocol>
<address>224.244.224.245</address>
<port>30490</port>
Expand All @@ -39,8 +38,16 @@
<id>0x1343</id>
</application>
<application>
<name>other-client-sample</name>
<name>second-client-sample</name>
<id>0x1344</id>
</application>
<application>
<name>third-client-sample</name>
<id>0x1345</id>
</application>
<application>
<name>fourth-client-sample</name>
<id>0x1346</id>
</application>
</applications>
</someip>
53 changes: 53 additions & 0 deletions config/vsomeip-udp-second-client.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- vsomeip test configuration file -->
<someip>
<address>192.168.56.101</address>
<logging>
<level>trace</level>
<console>true</console>
<file>
<enable>false</enable>
<path>/tmp/vsomeip.log</path>
</file>
<dlt>false</dlt>
</logging>
<services>
<servicegroup>
<name>remote</name>
<address>192.168.56.102</address>
<service>
<service-id>0x1234</service-id>
<instance-id>0x5678</instance-id>
<ports>
<unreliable>30507</unreliable>
</ports>
</service>
</servicegroup>
</services>
<routing>
<host>second-client-sample</host>
</routing>
<service-discovery>
<enabled>false</enabled>
<protocol>udp</protocol>
<address>224.244.224.245</address>
<port>30490</port>
</service-discovery>
<applications>
<application>
<name>client-sample</name>
<id>0x1343</id>
</application>
<application>
<name>second-client-sample</name>
<id>0x1344</id>
</application>
<application>
<name>third-client-sample</name>
<id>0x1345</id>
</application>
<application>
<name>fourth-client-sample</name>
<id>0x1346</id>
</application>
</applications>
</someip>
51 changes: 51 additions & 0 deletions config/vsomeip-udp-service.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- vsomeip test configuration file -->
<someip>
<address>192.168.56.102</address>
<logging>
<level>trace</level>
<console>true</console>
<file>
<enable>false</enable>
<path>/tmp/vsomeip.log</path>
</file>
<dlt>false</dlt>
</logging>
<services>
<servicegroup>
<name>default</name>
<delays>
<initial>
<min>10</min>
<max>100</max>
</initial>
<repetition-base>200</repetition-base>
<repetition-max>3</repetition-max>
<cyclic-offer>2000</cyclic-offer>
<cyclic-request>2001</cyclic-request>
</delays>
<service>
<service-id>0x1234</service-id>
<instance-id>0x5678</instance-id>
<ports>
<unreliable>30507</unreliable>
</ports>
</service>
</servicegroup>
</services>
<routing>
<host>service-sample</host>
</routing>
<service-discovery>
<enabled>false</enabled>
<host>client-sample</host>
<protocol>udp</protocol>
<address>224.244.224.245</address>
<port>30490</port>
</service-discovery>
<applications>
<application>
<name>service-sample</name>
<id>0x1277</id>
</application>
</applications>
</someip>
16 changes: 2 additions & 14 deletions config/vsomeip.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- vsomeip test configuration file -->
<someip>
<address>10.0.2.15</address>
<address>192.168.56.101</address>
<logging>
<level>trace</level>
<console>true</console>
Expand Down Expand Up @@ -41,24 +41,12 @@
<multicast>225.225.225.2</multicast>
</service>
</servicegroup>
<servicegroup>
<name>remote</name>
<address>10.0.2.17</address>
<service>
<service-id>0x4466</service-id>
<instance-id>0x0421</instance-id>
<port>
<reliable>30507</reliable>
</port>
</service>
</servicegroup>
</services>
<routing>
<host>client-sample</host>
</routing>
<service-discovery>
<enabled>false</enabled>
<host>client-sample</host>
<enabled>true</enabled>
<protocol>udp</protocol>
<address>224.244.224.245</address>
<port>30490</port>
Expand Down
Loading

0 comments on commit ecd8282

Please sign in to comment.