command_sync


Description:

[ Version ( since = "1.0" ) ]
public string command_sync (string cmd, uint timeout, Cancellable? cancellable = null) throws Error

Synchronously runs an AT command in the modem.

The calling thread is blocked until a reply is received. See command for the asynchronous version of this method.

Parameters:

this

A Modem.

cmd

AT command to run.

timeout

Maximum time to wait for the response, in seconds.

cancellable

A Cancellable or null.

Returns:

A newly allocated string with the reply to the command, or null if error is set. The returned value should be freed with g_free.