| 419 | } |
| 420 | |
| 421 | bool MultiIconPlugin::getSlotIdFromTopic(uint8_t& slotId, const String& topic) const |
| 422 | { |
| 423 | bool isSuccessful = false; |
| 424 | int32_t indexBeginSlotId = topic.lastIndexOf("/"); |
| 425 | |
| 426 | if (0 <= indexBeginSlotId) |
| 427 | { |
| 428 | String slotIdStr = topic.substring(indexBeginSlotId + 1); |
| 429 | uint8_t slotIdTmp; |
| 430 | bool statusSlotId = Util::strToUInt8(slotIdStr, slotIdTmp); |
| 431 | |
| 432 | if (true == statusSlotId) |
| 433 | { |
| 434 | slotId = slotIdTmp; |
| 435 | isSuccessful = true; |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | return isSuccessful; |
| 440 | } |
| 441 | |
| 442 | /****************************************************************************** |
| 443 | * External Functions |
nothing calls this directly
no test coverage detected