Made CIMCData a ruby object to allow passing values along with types to client methods.
Use case:
Some C sfcb provider is accepting a UInt8 value as method parameter.
Originally passing some integer to a method as parameter would turn in into CIMCData d = { .type = CIMC_sint64, .value.sint64 = val };
But providers are often coded in the way, that they check for exact type of input parameter and fail in case
they not match.
So with this modification one can write:
I've found out, that cloning is not necessary. Operations on container cimc types (CIMCArray, CIMCArgs), like get or set attributes, do the cloning themselfs, so it is safe to release them. This greatly simplifies the code.
Made CIMCData a ruby object to allow passing values along with types to client methods.
Use case:
Some C sfcb provider is accepting a UInt8 value as method parameter. Originally passing some integer to a method as parameter would turn in into
CIMCData d = { .type = CIMC_sint64, .value.sint64 = val };
But providers are often coded in the way, that they check for exact type of input parameter and fail in case they not match. So with this modification one can write:Changes from previous pull request
CIMCArray
,CIMCArgs
), like get or set attributes, do the cloning themselfs, so it is safe to release them. This greatly simplifies the code.