diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2014-07-25 12:32:45 +0200 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2014-07-25 12:32:45 +0200 |
commit | afdb12b765fa76d6cd0dfe7c92ce5fec69888dea (patch) | |
tree | 5092cc6da58924d5ca1536253c534fded55225ea /test | |
parent | 8e269cd5d31032a80e80a509399f22bcde9fadf6 (diff) | |
download | vSomeIP-afdb12b765fa76d6cd0dfe7c92ce5fec69888dea.tar.gz |
Switched to json configuration files.
Added event/eventgroup configuration (per service).
Diffstat (limited to 'test')
-rw-r--r-- | test/configuration-test.cpp | 20 | ||||
-rw-r--r-- | test/magic-cookies-test-client.cpp | 6 |
2 files changed, 5 insertions, 21 deletions
diff --git a/test/configuration-test.cpp b/test/configuration-test.cpp index ada2f83..9deed47 100644 --- a/test/configuration-test.cpp +++ b/test/configuration-test.cpp @@ -20,23 +20,18 @@ #define DESIRED_RELIABLE_1234_0022 30506 #define DESIRED_UNRELIABLE_1234_0022 31000 -#define DESIRED_MULTICAST_1234_0022 "225.225.225.1" #define DESIRED_RELIABLE_1234_0023 30503 -#define DESIRED_UNRELIABLE_1234_0023 vsomeip::illegal_port -#define DESIRED_MULTICAST_1234_0023 "225.225.225.2" +#define DESIRED_UNRELIABLE_1234_0023 vsomeip::ILLEGAL_PORT #define DESIRED_RELIABLE_2277_0022 30505 #define DESIRED_UNRELIABLE_2277_0022 31001 -#define DESIRED_MULTICAST_2277_0022 "225.225.225.3" #define DESIRED_RELIABLE_2266_0022 30505 #define DESIRED_UNRELIABLE_2266_0022 30507 -#define DESIRED_MULTICAST_2266_0022 "225.225.226.1" #define DESIRED_RELIABLE_4466_0321 30506 #define DESIRED_UNRELIABLE_4466_0321 30444 -#define DESIRED_MULTICAST_4466_0321 "225.225.228.1" #define DESIRED_ADDRESS_1234_0022 "local" #define DESIRED_MIN_INITIAL_DELAY_1234_0022 10 @@ -92,7 +87,7 @@ int main(int argc, char **argv) { } // 2. Check host address - boost::asio::ip::address its_address = its_configuration->get_address(); + boost::asio::ip::address its_address = its_configuration->get_unicast(); check<std::string>(its_address.to_string(), DESIRED_ADDRESS, "HOST ADDRESS"); // 3. Check logging @@ -111,44 +106,33 @@ int main(int argc, char **argv) { // 4. Services uint16_t its_reliable = its_configuration->get_reliable_port(0x1234, 0x0022); uint16_t its_unreliable = its_configuration->get_unreliable_port(0x1234, 0x0022); - std::string its_multicast = its_configuration->get_multicast(0x1234, 0x0022); check<uint16_t>(its_reliable, DESIRED_RELIABLE_1234_0022, "RELIABLE_TEST_1234_0022"); check<uint16_t>(its_unreliable, DESIRED_UNRELIABLE_1234_0022, "UNRELIABLE_TEST_1234_0022"); - check<std::string>(its_multicast, DESIRED_MULTICAST_1234_0022, "MULTICAST_TEST_1234_0022"); its_reliable = its_configuration->get_reliable_port(0x1234, 0x0023); its_unreliable = its_configuration->get_unreliable_port(0x1234, 0x0023); - its_multicast = its_configuration->get_multicast(0x1234, 0x0023); - check<uint16_t>(its_reliable, DESIRED_RELIABLE_1234_0023, "RELIABLE_TEST_1234_0023"); check<uint16_t>(its_unreliable, DESIRED_UNRELIABLE_1234_0023, "UNRELIABLE_TEST_1234_0023"); - check<std::string>(its_multicast, DESIRED_MULTICAST_1234_0023, "MULTICAST_TEST_1234_0023"); its_reliable = its_configuration->get_reliable_port(0x2277, 0x0022); its_unreliable = its_configuration->get_unreliable_port(0x2277, 0x0022); - its_multicast = its_configuration->get_multicast(0x2277, 0x0022); check<uint16_t>(its_reliable, DESIRED_RELIABLE_2277_0022, "RELIABLE_TEST_2277_0022"); check<uint16_t>(its_unreliable, DESIRED_UNRELIABLE_2277_0022, "UNRELIABLE_TEST_2277_0022"); - check<std::string>(its_multicast, DESIRED_MULTICAST_2277_0022, "MULTICAST_TEST_2277_0022"); its_reliable = its_configuration->get_reliable_port(0x4466, 0x0321); its_unreliable = its_configuration->get_unreliable_port(0x4466, 0x0321); - its_multicast = its_configuration->get_multicast(0x4466, 0x0321); check<uint16_t>(its_reliable, DESIRED_RELIABLE_4466_0321, "RELIABLE_TEST_4466_0321"); check<uint16_t>(its_unreliable, DESIRED_UNRELIABLE_4466_0321, "UNRELIABLE_TEST_4466_0321"); - check<std::string>(its_multicast, DESIRED_MULTICAST_4466_0321, "MULTICAST_TEST_4466_0321"); its_reliable = its_configuration->get_reliable_port(0x2277, 0x0022); its_unreliable = its_configuration->get_unreliable_port(0x2277, 0x0022); - its_multicast = its_configuration->get_multicast(0x2277, 0x0022); check<uint16_t>(its_reliable, DESIRED_RELIABLE_2277_0022, "RELIABLE_TEST_2277_0022"); check<uint16_t>(its_unreliable, DESIRED_UNRELIABLE_2277_0022, "UNRELIABLE_TEST_2277_0022"); - check<std::string>(its_multicast, DESIRED_MULTICAST_2277_0022, "MULTICAST_TEST_2277_0022"); std::string its_address_s = its_configuration->get_address(0x1234, 0x0022); std::string its_group_name = its_configuration->get_group(0x1234, 0x0022); diff --git a/test/magic-cookies-test-client.cpp b/test/magic-cookies-test-client.cpp index 8dea758..c65a565 100644 --- a/test/magic-cookies-test-client.cpp +++ b/test/magic-cookies-test-client.cpp @@ -41,7 +41,7 @@ public: std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); app_->register_message_handler( - vsomeip::any_service, SAMPLE_INSTANCE_ID, vsomeip::any_method, + vsomeip::ANY_SERVICE, SAMPLE_INSTANCE_ID, vsomeip::ANY_METHOD, std::bind(&client_sample::on_message, this, std::placeholders::_1)); @@ -61,8 +61,8 @@ public: if (_event == vsomeip::event_type_e::REGISTERED) { VSOMEIP_INFO << "Client registration done."; app_->request_service(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID, - vsomeip::any_major, vsomeip::any_minor, - vsomeip::any_ttl); + vsomeip::ANY_MAJOR, vsomeip::ANY_MINOR, + vsomeip::ANY_TTL); } } |