MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / HandleRoutingChange

Method HandleRoutingChange

src/libcec/implementations/CECCommandHandler.cpp:562–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562int CCECCommandHandler::HandleRoutingChange(const cec_command &command)
563{
564 if (command.parameters.size == 4)
565 {
566 CCECBusDevice *device = GetDevice(command.initiator);
567 if (device)
568 {
569 uint16_t iNewAddress = ((uint16_t)command.parameters[2] << 8) | ((uint16_t)command.parameters[3]);
570 /** only powered on device send routing changes */
571 device->SetPowerStatus(CEC_POWER_STATUS_ON);
572 device->SetActiveRoute(iNewAddress);
573 return COMMAND_HANDLED;
574 }
575 }
576
577 return CEC_ABORT_REASON_INVALID_OPERAND;
578}
579
580int CCECCommandHandler::HandleRoutingInformation(const cec_command &command)
581{

Callers

nothing calls this directly

Calls 2

SetPowerStatusMethod · 0.80
SetActiveRouteMethod · 0.80

Tested by

no test coverage detected