mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Updated a method name in VmsUtils." into qt-dev
am: 1f968cd87c
Change-Id: Iaf6cfb281fbdfb786a96ced641017a20da9cd4be
This commit is contained in:
@@ -172,7 +172,7 @@ std::unique_ptr<VehiclePropValue> createSubscriptionsRequest();
|
||||
// should first convert the proto to a byte string (vms_packet) using the
|
||||
// SerializeToString proto API. Then, it use this interface to build the VehicleProperty
|
||||
// by passing publisher and layer information (layer_publisher) and the vms_packet.
|
||||
std::unique_ptr<VehiclePropValue> CreateDataMessageWithLayerPublisherInfo(
|
||||
std::unique_ptr<VehiclePropValue> createDataMessageWithLayerPublisherInfo(
|
||||
const VmsLayerAndPublisher& layer_publisher, const std::string& vms_packet);
|
||||
|
||||
// Creates a VehiclePropValue containing a message of type
|
||||
|
||||
@@ -126,7 +126,7 @@ std::unique_ptr<VehiclePropValue> createSubscriptionsRequest() {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::unique_ptr<VehiclePropValue> CreateDataMessageWithLayerPublisherInfo(
|
||||
std::unique_ptr<VehiclePropValue> createDataMessageWithLayerPublisherInfo(
|
||||
const VmsLayerAndPublisher& layer_publisher, const std::string& vms_packet) {
|
||||
auto result = createBaseVmsMessage(kMessageTypeSize + kLayerAndPublisherSize);
|
||||
result->value.int32Values = hidl_vec<int32_t>{
|
||||
|
||||
@@ -141,7 +141,7 @@ TEST(VmsUtilsTest, subscriptionsMessage) {
|
||||
TEST(VmsUtilsTest, dataMessage) {
|
||||
const std::string bytes = "aaa";
|
||||
const VmsLayerAndPublisher layer_and_publisher(VmsLayer(2, 0, 1), 123);
|
||||
auto message = CreateDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes);
|
||||
auto message = createDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes);
|
||||
ASSERT_NE(message, nullptr);
|
||||
EXPECT_TRUE(isValidVmsMessage(*message));
|
||||
EXPECT_EQ(message->prop, toInt(VehicleProperty::VEHICLE_MAP_SERVICE));
|
||||
@@ -177,7 +177,7 @@ TEST(VmsUtilsTest, invalidMessageType) {
|
||||
TEST(VmsUtilsTest, parseDataMessage) {
|
||||
const std::string bytes = "aaa";
|
||||
const VmsLayerAndPublisher layer_and_publisher(VmsLayer(1, 0, 1), 123);
|
||||
auto message = CreateDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes);
|
||||
auto message = createDataMessageWithLayerPublisherInfo(layer_and_publisher, bytes);
|
||||
auto data_str = parseData(*message);
|
||||
ASSERT_FALSE(data_str.empty());
|
||||
EXPECT_EQ(data_str, bytes);
|
||||
|
||||
Reference in New Issue
Block a user