9fa85520 | 01-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add server method for set-property
Add a method to the server bindings that sets properties by looking up the name from a string.
Change-Id: I7e9081b66dfeffd394155a574c2178a7cd039e2a Signe
sdbus++: add server method for set-property
Add a method to the server bindings that sets properties by looking up the name from a string.
Change-Id: I7e9081b66dfeffd394155a574c2178a7cd039e2a Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
291f3264 | 21-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
Initialize transaction id
Initialize the transaction id in the code generated by the sdbusplus tool. Generate a unique value if the transaction id has not been initialized and a caller requests it.
Initialize transaction id
Initialize the transaction id in the code generated by the sdbusplus tool. Generate a unique value if the transaction id has not been initialized and a caller requests it. This is the scenario for clients that have not made a dbus call yet and create journal entries.
Change-Id: Ia7b926fd3f83963fac01fbd1ce4cdd59d2224008 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
560e5fd5 | 12-Jan-2017 |
Patrick Williams <patrick@stwcx.xyz> |
message: Change conversion ctor to inc ref-count
There are cases of calling the message constructor where the ownership of the raw pointer is transfered and others where it is duplicated. The owner
message: Change conversion ctor to inc ref-count
There are cases of calling the message constructor where the ownership of the raw pointer is transfered and others where it is duplicated. The ownership-transfer use-cases are likely all embedded within sdbusplus itself and the ownership-duplicate cases tend to be done by external users. This causes the current API to be bug-prone as it requires something like:
sdbusplus::message::message(sd_bus_message_ref(m));
Change the conversion constructor to not require the external _ref call and instead add a new constructor that bypasses the ref.
Thus, the calling conventions now look like this:
Ownership-duplicate: sdbusplus::message::message(m); // calls _ref. Ownership-transfer: sdbusplus::message::message(m, std::false_type()); // no _ref.
Resolves openbmc/openbmc#950.
Change-Id: Ia1ae527c4d1235b1625368cfffeb4ed495457768 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
8a30a8fb | 06-Jan-2017 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Use native types for obj-path and signature
Change-Id: I6075a6a52553d0dc7dca6abc3442282f91fb5d44 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
3f67eedd | 12-Dec-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: fix pep8 issues
Change-Id: I3efcfb0575cdfecb86f72368f34d4d33d9e00318 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
cf078c43 | 12-Dec-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Avoid using C++ reserved words
Some words are reserved in C++, so they cannot be used as function or variable names. If a YAML file specifies these we must come up with an alternative name
sdbus++: Avoid using C++ reserved words
Some words are reserved in C++, so they cannot be used as function or variable names. If a YAML file specifies these we must come up with an alternative name for the generated C++ function. Do this by adding underscore characters to the generated name.
Fixes openbmc/sdbusplus#10.
Change-Id: I992caafb02fe71ea6ac2cf3c555a9956e4ba616a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
abf5f78d | 12-Dec-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: fix incorrect type for variant
Change-Id: Ib353e19793bda85815826f7b835fd6f3c5d8e908 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
768f128c | 09-Dec-2016 |
Christian Andersen <c.andersen@kostal.com> |
sdbus++: Fix generation of enums
The fix to openbmc/sdbusplus#4 broke the generation of enums, because enums are currently not directly parsed by the cpp type conversion.
This also means that there
sdbus++: Fix generation of enums
The fix to openbmc/sdbusplus#4 broke the generation of enums, because enums are currently not directly parsed by the cpp type conversion.
This also means that there is additional work required to support enums nested into containers.
Fixes openbmc/sdbusplus#8
Change-Id: I4f206fa899d84128bc7463d54c5b83e40e28d61f Signed-off-by: Christian Andersen <c.andersen@kostal.com>
show more ...
|
e416398b | 09-Dec-2016 |
Christian Andersen <c.andersen@kostal.com> |
sdbus++: Handle parsing of multi-level containers
The type array contructed by YAML is difficult to process recursively. So the type array gets preprocessed and converted to a recursive data structu
sdbus++: Handle parsing of multi-level containers
The type array contructed by YAML is difficult to process recursively. So the type array gets preprocessed and converted to a recursive data structure.
Fixes openbmc/sdbusplus#4
Change-Id: Ife8a47d9b6babd75835f496702ca5899ac6e18c3 Signed-off-by: Christian Andersen <c.andersen@kostal.com>
show more ...
|
7904ed64 | 29-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove 'move' ops from server bindings
The generated server bindings register 'this' with sdbus, so if a move is allowed then the object pointer left with sdbus no longer exists. Disallo
sdbusplus: remove 'move' ops from server bindings
The generated server bindings register 'this' with sdbus, so if a move is allowed then the object pointer left with sdbus no longer exists. Disallow 'move' operations to prevent this.
Fixes openbmc/sdbusplus#6.
Change-Id: I470b1372042d21ce14ad0cd9bc1af68e7394bcb9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
abd10b08 | 22-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate valid code 0 return methods
A method with 0 returns could result in incorrectly generated code due to a mistake that looked at the param-count instead of the return-count.
Fixes o
sdbus++: generate valid code 0 return methods
A method with 0 returns could result in incorrectly generated code due to a mistake that looked at the param-count instead of the return-count.
Fixes openbmc/sdbusplus#3.
Change-Id: Ifbbd89ab8c8dcfee60c18446f30446b052992f3f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
aa71a3ed | 10-Nov-2016 |
Abhishek Pandit <abhishekpandit@google.com> |
Removed leading spaces from template
Removed leading spaces that were leaving trailing spaces in generated files.
Change-Id: I99927e7b8fe3762cf0cc28d113e02eae2fcd4db3 Signed-off-by: Abhishek Pandit
Removed leading spaces from template
Removed leading spaces that were leaving trailing spaces in generated files.
Change-Id: I99927e7b8fe3762cf0cc28d113e02eae2fcd4db3 Signed-off-by: Abhishek Pandit <abhishekpandit@google.com>
show more ...
|
9b373f0d | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: exception handling for property callbacks
Change-Id: I4230d5ebc7d2a470d9ae2d3bb03a9918a29ba919 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
0ad505ca | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: complete server support for enumerations
Perform final type conversion using 'convert*' functions to change between dbus strings and C++ enumerations for methods, properties, and signals.
sdbus++: complete server support for enumerations
Perform final type conversion using 'convert*' functions to change between dbus strings and C++ enumerations for methods, properties, and signals.
Change-Id: I22e8fd424eeecac176c64fcc3e7a5d3caf05804a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
386e8d20 | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: provide enum-string conversion functions
Change-Id: Ied31a6c11188fe3d0c909edb5c4bde3e337d96b3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
2adcefa6 | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: fix enumeration property default values
Current generation emits for enumerations: Enum property = EnumValue Fix this to be: Enum property = Enum::EnumValue
Change-Id: Iae1e8e4ad73
sdbus++: fix enumeration property default values
Current generation emits for enumerations: Enum property = EnumValue Fix this to be: Enum property = Enum::EnumValue
Change-Id: Iae1e8e4ad73bf8623ed9f3b2d3ec57803c7f18bd Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0aa0dded | 16-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: convert binding enum types to valid C++
When an enumeration is used in the bindings, the type of it depends on the context. We use 'string' types to send the enumeration across the dbus, s
sdbus++: convert binding enum types to valid C++
When an enumeration is used in the bindings, the type of it depends on the context. We use 'string' types to send the enumeration across the dbus, so we need to use 'string' types when doing message operations. We use the real enum type when calling binding functions, so we need to specify that in prototypes.
Change-Id: I31ab137b0c751d8a2bdec1c417a60455690ce103 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
8c00fed2 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add enumeration parsing
Change-Id: I6d02574942b38adbe2dc537f5279721cde2c8bc7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
fa5c311b | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate markdown for errors
Change-Id: Iafdf4c30e312b0ef7faeea3e3a7379f1868a61dc Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
d2505cc1 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: generate markdown for enumerations
Change-Id: I8b62aea7094e6e8e12d39e1341ebd07fc547b12b Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
bd0b06b4 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: clean up extra error response
The property set/get and method callback functions are suppose to return 1 or true to sdbus, otherwise the callbacks are treated as unhandled. Since the gener
sdbus++: clean up extra error response
The property set/get and method callback functions are suppose to return 1 or true to sdbus, otherwise the callbacks are treated as unhandled. Since the generated callbacks all populate the response message correctly, the result is that the client receives two messages but the 2nd (an error) is silently ignored by clients because it is a duplicate message. Clean this up, which reduces needless activity on the dbus.
Change-Id: I39699e498b0d113ec9819670a92e44e8108c88db Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ea241447 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: enhance exception information
Use both 'name' and 'description' for exceptions. All sdbusplus exceptions now have a 'name()' and 'description()' method which give the dbus error name and a
sdbus++: enhance exception information
Use both 'name' and 'description' for exceptions. All sdbusplus exceptions now have a 'name()' and 'description()' method which give the dbus error name and a human-readable description respectively. The standard 'what' is now '<name>: <description>'.
Change-Id: Ic6cdb88350c07589cbfbf233e84a575632383af6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
4a5c3b30 | 15-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Prepend all errors with 'Error' namespace
Old: Error identifier: com.example.Interface.LogicError Exception class: com::example::Interface::common::LogicError
New: Error identi
sdbus++: Prepend all errors with 'Error' namespace
Old: Error identifier: com.example.Interface.LogicError Exception class: com::example::Interface::common::LogicError
New: Error identifier: com.example.Interface.Error.LogicError Exception class: com::example::Interface::Error::LogicError
Change-Id: I866046f4a0514f5bce40bdef46a218060d107765 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d0cd9667 | 14-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: use consistent typenames for properties
Previously, the generated code was assuming C++ names, but the example (Calculator.interface.yaml) used an arbitrary name ('integer'). This commit d
sdbus++: use consistent typenames for properties
Previously, the generated code was assuming C++ names, but the example (Calculator.interface.yaml) used an arbitrary name ('integer'). This commit defines a consistent typename scheme and validates it when interfaces are generated.
Use English typenames from the DBus protocol in interface files rather than the C++ name or a single-letter DBus name. Use square-bracket ([]) to identify sub-types for containers.
Examples: 'int64', 'path', 'array[dict[string, byte]]'
Change-Id: I38abe84c9cd3d5f839968349d2d3cfa0b8796cd0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
31691cf1 | 13-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add exception handling to server bindings
Change-Id: Id313bb05c7cb910b7669046cffac668bf04af11d Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |