Convert Arduino Code to Mbed code

Hello sir hope your doing well
i need to convert this code
The modem establishes TCP/IP connection to connect with Internet. The following function is called to initiate connection of the modem with the internet –

while (!A9G.TCPstart(SIM_APN,SIM_USER,SIM_PASSWORD))

{

Serial.println(“TCPstart failed”);

A9G.TCPstop();

delay(1000);

}

Serial.println(“TCPstart started”);