----------------------------------------------------------------------------- A value in a device has changed -----------------------------------------------------------------------------
| 432 | // A value in a device has changed |
| 433 | //----------------------------------------------------------------------------- |
| 434 | void Value::OnValueChanged |
| 435 | ( |
| 436 | ) |
| 437 | { |
| 438 | if( IsWriteOnly() ) |
| 439 | { |
| 440 | return; |
| 441 | } |
| 442 | |
| 443 | if( Driver* driver = Manager::Get()->GetDriver( m_id.GetHomeId() ) ) |
| 444 | { |
| 445 | m_isSet = true; |
| 446 | |
| 447 | // Notify the watchers |
| 448 | Notification* notification = new Notification( Notification::Type_ValueChanged ); |
| 449 | notification->SetValueId( m_id ); |
| 450 | driver->QueueNotification( notification ); |
| 451 | } |
| 452 | /* Call Back to the Command Class that this Value has changed, so we can search the |
| 453 | * TriggerRefreshValue vector to see if we should request any other values to be |
| 454 | * refreshed. |
| 455 | */ |
| 456 | Node* node = NULL; |
| 457 | if( Driver* driver = Manager::Get()->GetDriver( m_id.GetHomeId() ) ) |
| 458 | { |
| 459 | node = driver->GetNodeUnsafe( m_id.GetNodeId() ); |
| 460 | if( node != NULL ) |
| 461 | { |
| 462 | if( CommandClass* cc = node->GetCommandClass( m_id.GetCommandClassId() ) ) |
| 463 | { |
| 464 | cc->CheckForRefreshValues(this); |
| 465 | } |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | } |
| 470 | |
| 471 | //----------------------------------------------------------------------------- |
| 472 | // <Value::GetGenreEnumFromName> |
nothing calls this directly
no test coverage detected