@@ -97,18 +97,6 @@ class CellularDevice {
9797
9898public: // Virtual functions
9999
100- /* * Clear modem to a default initial state
101- *
102- * Clear persistent user data from the modem, such as PDP contexts.
103- *
104- * @pre All open network services on modem, such as contexts and sockets, must be closed.
105- * @post Modem power off/on may be needed to clear modem's runtime state.
106- * @remark CellularStateMachine calls this on connect when `cellular.clear-on-connect: true`.
107- *
108- * @return NSAPI_ERROR_OK on success, otherwise modem may be need power cycling
109- */
110- virtual nsapi_error_t clear ();
111-
112100 /* * Shutdown cellular device to minimum functionality.
113101 *
114102 * Actual functionality is modem specific, for example UART may is not be responsive without
@@ -121,12 +109,6 @@ class CellularDevice {
121109 */
122110 virtual nsapi_error_t shutdown ();
123111
124- /* * Get the linked list of CellularContext instances
125- *
126- * @return Pointer to first item in linked list
127- */
128- virtual CellularContext *get_context_list () const ;
129-
130112 /* * Get event queue that can be chained to main event queue.
131113 * @return event queue
132114 */
@@ -142,6 +124,25 @@ class CellularDevice {
142124
143125public: // Pure virtual functions
144126
127+ /* * Clear modem to a default initial state
128+ *
129+ * Clear persistent user data from the modem, such as PDP contexts.
130+ *
131+ * @pre All open network services on modem, such as contexts and sockets, must be closed.
132+ * @post Modem power off/on may be needed to clear modem's runtime state.
133+ * @remark CellularStateMachine calls this on connect when `cellular.clear-on-connect: true`.
134+ *
135+ * @return NSAPI_ERROR_OK on success, otherwise modem may be need power cycling
136+ */
137+ virtual nsapi_error_t clear () = 0;
138+
139+
140+ /* * Get the linked list of CellularContext instances
141+ *
142+ * @return Pointer to first item in linked list
143+ */
144+ virtual CellularContext *get_context_list () const = 0;
145+
145146 /* * Sets the modem up for powering on
146147 * This is equivalent to plugging in the device, i.e., attaching power and serial port.
147148 * In general, hard_power_on and soft_power_on provides a simple hardware abstraction layer
0 commit comments