----------------------------------------------------------------------------- Gets the units that the value is measured in -----------------------------------------------------------------------------
| 1810 | // Gets the units that the value is measured in |
| 1811 | //----------------------------------------------------------------------------- |
| 1812 | string Manager::GetValueUnits |
| 1813 | ( |
| 1814 | ValueID const& _id |
| 1815 | ) |
| 1816 | { |
| 1817 | string units; |
| 1818 | if( Driver* driver = GetDriver( _id.GetHomeId() ) ) |
| 1819 | { |
| 1820 | LockGuard LG(driver->m_nodeMutex); |
| 1821 | if( Value* value = driver->GetValue( _id ) ) |
| 1822 | { |
| 1823 | units = value->GetUnits(); |
| 1824 | value->Release(); |
| 1825 | } else { |
| 1826 | OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to GetValueUnits"); |
| 1827 | } |
| 1828 | } |
| 1829 | |
| 1830 | return units; |
| 1831 | } |
| 1832 | |
| 1833 | //----------------------------------------------------------------------------- |
| 1834 | // <Manager::SetValueUnits> |