Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DmTftLibrary eeprom SX1280Lib filesystem mbed
Fork of MSNV2-Terminal_V1-5 by
Diff: Payload.cpp
- Revision:
- 19:4b147d8f9164
- Parent:
- 18:d5e7e56b0a0d
- Child:
- 20:b0281e8a375a
diff -r d5e7e56b0a0d -r 4b147d8f9164 Payload.cpp --- a/Payload.cpp Thu Aug 30 08:40:16 2018 +0000 +++ b/Payload.cpp Thu Aug 30 08:48:19 2018 +0000 @@ -5,28 +5,28 @@ Payload::Payload(Payload::PAYLOAD_ID id, std::vector<Component*> components) : _id(id), _components(components) { for (std::vector<Component*>::iterator it = this->_components.begin(); it != this->_components.end(); it++) { Component* component = *it; - for(std::vector<Channel*>::iterator it = component->getChannels().begin(); it != component->getChannels().end(); it++) { + for(std::vector<Service*>::iterator it = component->getServices().begin(); it != component->getServices().end(); it++) { this->_channels.push_back(*it); } } /* for (Component component : this->_components) { - for (Channel* channel : component.getChannels()) { + for (Service* channel : component.getServices()) { this->_channels.push_back(channel); } */ } -Channel* Payload::getChannelByRank(short channelRank) { +Service* Payload::getServiceByRank(short channelRank) { /* if (channelRank < 1 || channelRank > 6) { - throw ChannelException(); + throw ServiceException(); } */ if (channelRank < 1 || channelRank > 6) { - return (Channel*) NULL; + return (Service*) NULL; } return this->_channels[channelRank - 1]; @@ -44,13 +44,13 @@ // std::cout << **it << std::endl; //} - std::vector<Channel*> channels = payload._channels; + std::vector<Service*> channels = payload._channels; out << "There are " << channels.size() << " channels." << std::endl; out << "List of channels :\n------------------" << std::endl; - for(std::vector<Channel*>::iterator it = channels.begin(); it != channels.end(); it++) { - Channel* channel = *it; + for(std::vector<Service*>::iterator it = channels.begin(); it != channels.end(); it++) { + Service* channel = *it; std::cout << *channel << std::endl; } @@ -59,7 +59,7 @@ out << " (component : " << *component << ")"; } - for (Channel* channel : payload._channels) { + for (Service* channel : payload._channels) { out << " (channel : " << *channel << ")"; } */