From b59228988cbe0072ca3f2c6c2d1a28f5980f4f7b Mon Sep 17 00:00:00 2001 From: Chris Trowbridge Date: Thu, 18 Apr 2019 15:02:41 -0400 Subject: [PATCH 1/2] Make AT_CellularContext::get_context() virtual --- features/cellular/framework/AT/AT_CellularContext.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/cellular/framework/AT/AT_CellularContext.h b/features/cellular/framework/AT/AT_CellularContext.h index 96951e967ee..b8519d1714b 100644 --- a/features/cellular/framework/AT/AT_CellularContext.h +++ b/features/cellular/framework/AT/AT_CellularContext.h @@ -99,6 +99,9 @@ class AT_CellularContext : public CellularContext, public AT_CellularBase { virtual void deactivate_ip_context(); virtual void set_disconnect(); virtual void deactivate_context(); + virtual bool get_context(); + pdp_type_t string_to_pdp_type(const char *pdp_type); + AT_CellularBase::CellularProperty pdp_type_t_to_cellular_property(pdp_type_t pdp_type); private: #if NSAPI_PPP_AVAILABLE nsapi_error_t open_data_channel(); @@ -111,11 +114,8 @@ class AT_CellularContext : public CellularContext, public AT_CellularBase { nsapi_error_t activate_ip_context(); void check_and_deactivate_context(); bool set_new_context(int cid); - bool get_context(); nsapi_error_t delete_current_context(); - pdp_type_t string_to_pdp_type(const char *pdp_type); nsapi_error_t check_operation(nsapi_error_t err, ContextOperation op); - AT_CellularBase::CellularProperty pdp_type_t_to_cellular_property(pdp_type_t pdp_type); void ciot_opt_cb(mbed::CellularNetwork::CIoT_Supported_Opt ciot_opt); virtual void do_connect_with_retry(); private: From a457b80e813e4eb9b95aa123be60098738d339e5 Mon Sep 17 00:00:00 2001 From: Chris Trowbridge Date: Thu, 18 Apr 2019 15:14:08 -0400 Subject: [PATCH 2/2] More access modifier changes --- features/cellular/framework/AT/AT_CellularContext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/cellular/framework/AT/AT_CellularContext.h b/features/cellular/framework/AT/AT_CellularContext.h index b8519d1714b..7c76a755547 100644 --- a/features/cellular/framework/AT/AT_CellularContext.h +++ b/features/cellular/framework/AT/AT_CellularContext.h @@ -102,6 +102,7 @@ class AT_CellularContext : public CellularContext, public AT_CellularBase { virtual bool get_context(); pdp_type_t string_to_pdp_type(const char *pdp_type); AT_CellularBase::CellularProperty pdp_type_t_to_cellular_property(pdp_type_t pdp_type); + bool set_new_context(int cid); private: #if NSAPI_PPP_AVAILABLE nsapi_error_t open_data_channel(); @@ -113,7 +114,6 @@ class AT_CellularContext : public CellularContext, public AT_CellularBase { nsapi_error_t find_and_activate_context(); nsapi_error_t activate_ip_context(); void check_and_deactivate_context(); - bool set_new_context(int cid); nsapi_error_t delete_current_context(); nsapi_error_t check_operation(nsapi_error_t err, ContextOperation op); void ciot_opt_cb(mbed::CellularNetwork::CIoT_Supported_Opt ciot_opt); @@ -121,12 +121,12 @@ class AT_CellularContext : public CellularContext, public AT_CellularBase { private: bool _is_connected; ContextOperation _current_op; - char _found_apn[MAX_APN_LENGTH]; FileHandle *_fh; rtos::Semaphore _semaphore; rtos::Semaphore _cp_opt_semaphore; protected: + char _found_apn[MAX_APN_LENGTH]; // flag indicating if CP was requested to be setup bool _cp_req; // flag indicating if Non-IP context was requested to be setup