rwl / PyCIM

Python implementation of the Common Information Model.
http://rwl.github.io/PyCIM/api/
MIT License
77 stars 35 forks source link

Domain classes missing #2

Closed sscherfke closed 13 years ago

sscherfke commented 13 years ago

The Domain classes (e.g. Voltage, ApparentPower) are still missing.

<cim:BasePower rdf:ID="BasePower">
    <cim:BasePower.basePower.value>10</cim:BasePower.basePower.value>
    <cim:BasePower.basePower.multiplier>M</cim:BasePower.basePower.multiplier>
</cim:BasePower>

produces an error, that M cannot be casted to float.

rwl commented 13 years ago

I have generated classes for base data types and enumerations in commit a6e68b759.

According to the v14 model that I am using, the "basePower" attribute of BasePower is of ApparentPower type, which is just a float and has no "value" or "multiplier" attributes. There is a UnitMultiplier data type, but it is an enumeration and would be serialized as such.