Lines Matching +full:d +full:- +full:bus

4 #include <ipmid/api-types.hpp>
7 #include <phosphor-logging/lg2.hpp>
33 * than the default 25s D-Bus timeout. */
50 * @param[in] intf - The interface used for each lookup
51 * @param[in] path - The path used for each lookup
59 * @param[in] bus - The bus associated with and used for looking
62 const std::string& getService(sdbusplus::bus_t& bus);
67 /** @brief A wrapper around sdbusplus bus.new_method_call
69 * @param[in] bus - The bus used for calling the method
70 * @param[in] intf - The interface containing the method
71 * @param[in] method - The method name
74 sdbusplus::message_t newMethodCall(sdbusplus::bus_t& bus, const char* intf,
79 * @param[in] bus - The bus used for the service lookup
82 bool isValid(sdbusplus::bus_t& bus) const;
91 /** @brief The name of the bus used in the service lookup */
98 * @param[in] bus - DBUS Bus Object
99 * @param[in] intf - DBUS Interface
100 * @param[in] path - DBUS Object Path
103 std::string getService(sdbusplus::bus_t& bus, const std::string& intf,
107 * @param[in] bus - DBUS Bus Object.
108 * @param[in] interfaces - Dbus interface.
109 * @param[in] subtreePath - subtree from where the search should start.
110 * @param[in] depth - Search depth
113 ObjectTree getSubTree(sdbusplus::bus_t& bus, const InterfaceList& interface,
118 * @param[in] bus - DBUS Bus Object.
119 * @param[in] interface - Dbus interface.
120 * @param[in] subtreePath - subtree from where the search should start.
121 * @param[in] match - identifier for object.
125 sdbusplus::bus_t& bus, const std::string& interface,
130 * @param[in] bus - DBUS Bus Object.
131 * @param[in] service - Dbus service name.
132 * @param[in] objPath - Dbus object path.
133 * @param[in] interface - Dbus interface.
134 * @param[in] property - name of the property.
137 Value getDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
144 * @param[in] bus - DBUS Bus Object.
145 * @param[in] service - Dbus service name.
146 * @param[in] objPath - Dbus object path.
147 * @param[in] interface - Dbus interface.
151 sdbusplus::bus_t& bus, const std::string& service,
157 * @param[in] bus - D-Bus Bus Object.
158 * @param[in] service - D-Bus service name.
159 * @param[in] objPath - D-Bus object path.
162 ObjectValueTree getManagedObjects(sdbusplus::bus_t& bus,
167 * @param[in] bus - DBUS Bus Object.
168 * @param[in] service - Dbus service name.
169 * @param[in] objPath - Dbus object path.
170 * @param[in] interface - Dbus interface.
171 * @param[in] property - name of the property.
172 * @param[in] value - value which needs to be set.
174 void setDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
181 * @param[in] bus - DBUS Bus Object.
182 * @param[in] serviceRoot - Service root path.
183 * @param[in] interface - Dbus interface.
184 * @param[in] match - Identifier for a path.
188 sdbusplus::bus_t& bus, const std::string& serviceRoot,
193 * @param[in] bus - DBUS Bus Object.
194 * @param[in] serviceRoot - Service root path.
195 * @param[in] interface - Dbus interface.
196 * @param[in] match - Identifier for object.
198 void deleteAllDbusObjects(sdbusplus::bus_t& bus, const std::string& serviceRoot,
205 * @param[in] bus - Dbus bus object.
206 * @param[in] path - Child Dbus object path.
207 * @param[in] interfaces - Dbus interface list.
210 ObjectTree getAllAncestors(sdbusplus::bus_t& bus, const std::string& path,
214 /********* Begin co-routine yielding alternatives ***************/
216 /** @brief Get the D-Bus Service name for the input D-Bus path
218 * @param[in] ctx - ipmi::Context::ptr
219 * @param[in] intf - D-Bus Interface
220 * @param[in] path - D-Bus Object Path
221 * @param[out] service - requested service name
230 * @param[in] ctx - ipmi::Context::ptr
231 * @param[in] bus - DBUS Bus Object.
232 * @param[in] interfaces - Dbus interface.
233 * @param[in] subtreePath - subtree from where the search should start.
234 * @param[in] depth - Search depth
235 * @param[out] objectTree - map of object path and service info.
242 /** @brief Gets the D-Bus object info implementing the given interface
244 * @param[in] ctx - ipmi::Context::ptr
245 * @param[in] interface - D-Bus interface.
246 * @param[in][optional] subtreePath - subtree from where the search starts.
247 * @param[in][optional] match - identifier for object.
248 * @param[out] D-Bus object with path and service name
249 * @return - boost error code object
273 * @param[in] ctx - ipmi::Context::ptr
274 * @param[in] service - D-Bus service name.
275 * @param[in] objPath - D-Bus object path.
276 * @param[in] interface - D-Bus interface.
277 * @param[in] property - name of the property.
278 * @param[out] propertyValue - value of the D-Bus property.
279 * @return - boost error code object
288 auto variant = ctx->bus->yield_method_call<std::variant<Type>>(
289 ctx->yield, ec, service.c_str(), objPath.c_str(), PROP_INTF, METHOD_GET,
308 * @param[in] ctx - ipmi::Context::ptr
309 * @param[in] service - D-Bus service name.
310 * @param[in] objPath - D-Bus object path.
311 * @param[in] interface - D-Bus interface.
312 * @param[out] properties - map of name value pair.
313 * @return - boost error code object
320 * @param[in] ctx - ipmi::Context::ptr
321 * @param[in] service - D-Bus service name.
322 * @param[in] objPath - D-Bus object path.
323 * @param[in] interface - D-Bus interface.
324 * @param[in] property - name of the property.
325 * @param[in] value - value which needs to be set.
326 * @return - boost error code object
333 /** @brief Gets all the D-Bus objects from the given service root
335 * @param[in] ctx - ipmi::Context::ptr
336 * @param[in] serviceRoot - Service root path.
337 * @param[in] interface - D-Bus interface.
338 * @param[in][optional] match - Identifier for a path.
339 * @param[out] objectree - map of object path and service info.
340 * @return - boost error code object
355 /** @brief Deletes all the D-Bus objects from the given service root
357 * @param[in] ctx - ipmi::Context::ptr
358 * @param[out] ec - boost error code object
359 * @param[in] serviceRoot - Service root path.
360 * @param[in] interface - D-Bus interface.
361 * @param[in] match - Identifier for object.
370 * @param[in] ctx - ipmi::Context::ptr
371 * @param[in] service - D-Bus service name.
372 * @param[in] objPath - D-Bus object path.
373 * @param[out] objects - map of name value pair.
374 * @return - boost error code object
382 * @param[in] ctx - ipmi::Context::ptr
383 * @param[in] path - Child D-Bus object path.
384 * @param[in] interfaces - D-Bus interface list.
385 * @param[out] ObjectTree - map of object path and service info.
386 * @return - boost error code object
394 * @param[in] ctx - ipmi::Context::ptr
395 * @param[in] service - D-Bus service name.
396 * @param[in] objPath - D-Bus object path.
397 * @param[in] interface - D-Bus interface.
398 * @param[in] method - name of the method.
399 * @return - boost error code object
406 /********* End co-routine yielding alternatives ***************/
412 * @tparam T - type of expected value to return
413 * @param[in] props - D-Bus propery map (Map of variants)
414 * @param[in] name - key name of property to fetch
415 * @param[in] defaultValue - default value to return on error
416 * @return - value from propery map at name, or defaultValue
427 const T* prop = std::get_if<T>(&item->second);
460 * @param[in] bus - DBUS Bus Object.
461 * @param[in] service - Dbus service name.
462 * @param[in] objPath - Dbus object path.
463 * @param[in] interface - Dbus interface.
464 * @param[in] method - Dbus method.
466 void callDbusMethod(sdbusplus::bus_t& bus, const std::string& service,
479 ctx->bus->yield_method_call(ctx->yield, ec, service, objPath, interface,
491 auto rc = ctx->bus->yield_method_call<RetType>(
492 ctx->yield, ec, service, objPath, interface, method, args...);
497 /** @brief Perform the low-level i2c bus write-read.
498 * @param[in] i2cBus - i2c bus device node name, such as /dev/i2c-2.
499 * @param[in] targetAddr - i2c device target address.
500 * @param[in] writeData - The data written to i2c device.
501 * @param[out] readBuf - Data read from the i2c device.