sdbus的org.freedesktop.DBus.Properties提供了GetAll方法,用于一次性读取所有property
//sync_allp.cpp
#include <sdbusplus/bus.hpp>
#include <sdbusplus/unpack_properties.hpp>
#include <iostream>
#include <vector>
using namespace std;
using namespace sdbusplus;
int main()
{
auto b = bus::new_default_user();
auto methodGet = b.new_method_call("calculate.service", "/calculate_obj","org.freedesktop.DBus.Properties", "GetAll");
methodGet.append("calculate_infterface.data");
methodGet.append("data");
auto reply = b.call(methodGet);
vector<pair<string, variant<int, string>>> ret;
reply.read(ret);
int data