mirror of https://github.com/ARMmbed/mbed-os.git
Local modem ip stacks vary in their implementations and the way of working. Some of the modems may not open a socket until an IP context is assigned. That's why we came up with a container that stores addresses of any CellularSocket instances created on-demand by the application. When the application requests opening a socket we store allocate and store the premitive in the container however actual socket creation at the modem may happen at a later stage, e.g., a call to send_to() may result in actual opening of a socket. That's why we must not assign socket ids in the CellularSocket object during construction. It must happen when actual socket is opened and is alive. Another implication of the previous model is that we may have multiple sockets created in our container but the actual socket ids are not assigned yet, so we cannot directly map the socket id to the container indices which has been happening previously. To solve this issue we have promoted the AT_CellularStac::find_socket_index(...) method to be a protected method rather than being private so that the children can use the method to determine if the given index in the container corrsponds to the assigned socket id or not. We have given up on the socket->created flag and the whole decision making to actually open a socket on the modem happens on the basis of a valid socket being assigned or not. |
||
---|---|---|
.. | ||
ATHandler.cpp | ||
ATHandler.h | ||
ATHandler_factory.cpp | ||
AT_CellularBase.cpp | ||
AT_CellularBase.h | ||
AT_CellularContext.cpp | ||
AT_CellularContext.h | ||
AT_CellularDevice.cpp | ||
AT_CellularDevice.h | ||
AT_CellularInformation.cpp | ||
AT_CellularInformation.h | ||
AT_CellularNetwork.cpp | ||
AT_CellularNetwork.h | ||
AT_CellularSMS.cpp | ||
AT_CellularSMS.h | ||
AT_CellularStack.cpp | ||
AT_CellularStack.h | ||
AT_ControlPlane_netif.cpp | ||
AT_ControlPlane_netif.h |