mbed-os/features/cellular/framework/AT
Hasnain Virk bded22ee98 Prevent assigning socket id until opened at modem
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.
2019-05-22 23:43:41 -07:00
..
ATHandler.cpp Merge pull request #10354 from hasnainvirk/compile_error_at_handler 2019-04-09 11:06:15 -05:00
ATHandler.h Cellular: send disconnect to correct ctx 2019-04-17 13:53:40 +03:00
ATHandler_factory.cpp cellular: AT Handler API changes after review 2018-12-14 13:19:03 +02:00
AT_CellularBase.cpp Cellular: changed support features to CellularProperty array. 2019-01-22 02:23:04 -08:00
AT_CellularBase.h Merge pull request #10488 from kivaisan/add_cellularproperty_description 2019-04-30 09:40:08 +01:00
AT_CellularContext.cpp Cellular: Initialize CellularContext member variables in correct class 2019-05-10 11:43:48 +03:00
AT_CellularContext.h Cellular: send disconnect to correct ctx 2019-04-17 13:53:40 +03:00
AT_CellularDevice.cpp Cellular: Fix setting of statemachine timeout 2019-05-09 04:42:30 -07:00
AT_CellularDevice.h Cellular: Fix setting of statemachine timeout 2019-05-09 04:42:30 -07:00
AT_CellularInformation.cpp Cellular: fix calls to ATHandler::read_string(...) give correct size 2019-04-25 11:20:05 +03:00
AT_CellularInformation.h Removed CellularSIM interface. 2019-01-22 02:23:03 -08:00
AT_CellularNetwork.cpp Cellular: send disconnect to correct ctx 2019-04-17 13:53:40 +03:00
AT_CellularNetwork.h Cellular: send disconnect to correct ctx 2019-04-17 13:53:40 +03:00
AT_CellularSMS.cpp C030_N211 cellular api refactoring 2019-02-26 17:28:01 +05:00
AT_CellularSMS.h cellular: astyle fix 2018-07-27 13:33:20 +01:00
AT_CellularStack.cpp Prevent assigning socket id until opened at modem 2019-05-22 23:43:41 -07:00
AT_CellularStack.h Prevent assigning socket id until opened at modem 2019-05-22 23:43:41 -07:00
AT_ControlPlane_netif.cpp Cellular: Non-IP socket and PDP context for EPS control plane data delivery 2019-01-22 02:24:44 -08:00
AT_ControlPlane_netif.h Cellular: Non-IP doxygen updates 2019-02-18 09:53:59 +02:00