17
17
18
18
#include < cstdlib>
19
19
#include " GEMALTO_CINTERION_CellularStack.h"
20
- #include " GEMALTO_CINTERION_Module .h"
20
+ #include " GEMALTO_CINTERION .h"
21
21
#include " CellularLog.h"
22
22
23
23
// defines as per ELS61-E2_ATC_V01.000 and BGS2-W_ATC_V00.100
@@ -91,7 +91,7 @@ void GEMALTO_CINTERION_CellularStack::sisw_urc_handler(int sock_id, int urc_code
91
91
if (urc_code == 1 ) { // ready
92
92
if (sock->_cb ) {
93
93
sock->tx_ready = true ;
94
- if (sock->proto == NSAPI_TCP || GEMALTO_CINTERION_Module::get_model () == GEMALTO_CINTERION_Module::ModelBGS2 ) {
94
+ if (sock->proto == NSAPI_TCP || GEMALTO_CINTERION::get_module () == GEMALTO_CINTERION::ModuleBGS2 ) {
95
95
sock->started = true ;
96
96
}
97
97
sock->_cb (sock->_data );
@@ -180,7 +180,7 @@ nsapi_error_t GEMALTO_CINTERION_CellularStack::socket_open_defer(CellularSocket
180
180
char sock_addr[sizeof (" sockudp://" ) - 1 + NSAPI_IPv6_SIZE + sizeof (" []:12345;port=12345" ) - 1 + 1 ];
181
181
182
182
if (socket->proto == NSAPI_UDP) {
183
- if (GEMALTO_CINTERION_Module::get_model () != GEMALTO_CINTERION_Module::ModelBGS2 ) {
183
+ if (GEMALTO_CINTERION::get_module () != GEMALTO_CINTERION::ModuleBGS2 ) {
184
184
std::sprintf (sock_addr, " sockudp://%s:%u" , address ? address->get_ip_address () : " " , socket->localAddress .get_port ());
185
185
} else {
186
186
std::sprintf (sock_addr, " sockudp://%s:%u;port=%u" , address->get_ip_address (), address->get_port (), socket->localAddress .get_port ());
@@ -286,7 +286,7 @@ nsapi_error_t GEMALTO_CINTERION_CellularStack::create_socket_impl(CellularSocket
286
286
}
287
287
288
288
if (socket->proto == NSAPI_UDP) {
289
- if (GEMALTO_CINTERION_Module::get_model () != GEMALTO_CINTERION_Module::ModelBGS2 ) {
289
+ if (GEMALTO_CINTERION::get_module () != GEMALTO_CINTERION::ModuleBGS2 ) {
290
290
return socket_open_defer (socket);
291
291
}
292
292
}
@@ -306,7 +306,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_sendto_impl(Cellul
306
306
}
307
307
}
308
308
309
- if (socket->proto == NSAPI_UDP && GEMALTO_CINTERION_Module::get_model () == GEMALTO_CINTERION_Module::ModelBGS2 ) {
309
+ if (socket->proto == NSAPI_UDP && GEMALTO_CINTERION::get_module () == GEMALTO_CINTERION::ModuleBGS2 ) {
310
310
tr_debug (" Send addr %s, prev addr %s" , address.get_ip_address (), socket->remoteAddress .get_ip_address ());
311
311
if (address != socket->remoteAddress ) {
312
312
if (socket->started ) {
@@ -349,7 +349,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_sendto_impl(Cellul
349
349
_at.write_int (socket->id );
350
350
_at.write_int (size);
351
351
352
- if (GEMALTO_CINTERION_Module::get_model () != GEMALTO_CINTERION_Module::ModelBGS2 ) {
352
+ if (GEMALTO_CINTERION::get_module () != GEMALTO_CINTERION::ModuleBGS2 ) {
353
353
_at.write_int (0 );
354
354
355
355
// UDP requires Udp_RemClient
@@ -466,7 +466,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_recvfrom_impl(Cell
466
466
}
467
467
468
468
// UDP Udp_RemClient
469
- if (socket->proto == NSAPI_UDP && GEMALTO_CINTERION_Module::get_model () != GEMALTO_CINTERION_Module::ModelBGS2 ) {
469
+ if (socket->proto == NSAPI_UDP && GEMALTO_CINTERION::get_module () != GEMALTO_CINTERION::ModuleBGS2 ) {
470
470
char ip_address[NSAPI_IPv6_SIZE + sizeof (" []:12345" ) - 1 + 1 ];
471
471
int ip_len = _at.read_string (ip_address, sizeof (ip_address));
472
472
if (ip_len <= 0 ) {
@@ -513,7 +513,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_recvfrom_impl(Cell
513
513
// setup internet connection profile for sockets
514
514
nsapi_error_t GEMALTO_CINTERION_CellularStack::create_connection_profile (int connection_profile_id)
515
515
{
516
- if (GEMALTO_CINTERION_Module::get_model () == GEMALTO_CINTERION_Module::ModelEMS31 ) {
516
+ if (GEMALTO_CINTERION::get_module () == GEMALTO_CINTERION::ModuleEMS31 ) {
517
517
// EMS31 connection has only DNS settings and there is no need to modify those here for now
518
518
return NSAPI_ERROR_OK;
519
519
}
@@ -579,7 +579,7 @@ nsapi_error_t GEMALTO_CINTERION_CellularStack::create_connection_profile(int con
579
579
580
580
void GEMALTO_CINTERION_CellularStack::close_connection_profile (int connection_profile_id)
581
581
{
582
- if (GEMALTO_CINTERION_Module::get_model () == GEMALTO_CINTERION_Module::ModelEMS31 ) {
582
+ if (GEMALTO_CINTERION::get_module () == GEMALTO_CINTERION::ModuleEMS31 ) {
583
583
return ;
584
584
}
585
585
0 commit comments