According to the Mbed API documentation, NetworkInterface::attach and NetworkInterface::add_event_listener:
Quote:
Application may only use attach() or add_event_listener() interface.
This constraint works if applications are the only callers of these methods. If a service or class derived from NetworkInterface or EMACInterface also registers (must be add_event_listener), then calls to attach should either fail or be forwarded to add_event_listener.
One possible thought here would be to provide a protected version of attach (i.e. _attach) and allow derived classes to override attach as necessary.
According to the Mbed API documentation,
NetworkInterface::attachandNetworkInterface::add_event_listener:Quote:
Application may only use attach() or add_event_listener() interface.
This constraint works if applications are the only callers of these methods. If a service or class derived from
NetworkInterfaceorEMACInterfacealso registers (must beadd_event_listener), then calls toattachshould either fail or be forwarded toadd_event_listener.One possible thought here would be to provide a protected version of
attach(i.e._attach) and allow derived classes to overrideattachas necessary.