## Ms Sar service

Ms Sar service — Support for the Ms Sar service.

## Functions

void | mbim_sar_config_state_array_free ()
MbimMessage * | mbim_message_ms_sar_config_query_new ()
MbimMessage * | mbim_message_ms_sar_config_set_new ()
gboolean | mbim_message_ms_sar_config_response_parse ()
MbimMessage * | mbim_message_ms_sar_transmission_status_query_new ()
MbimMessage * | mbim_message_ms_sar_transmission_status_set_new ()
gboolean | mbim_message_ms_sar_transmission_status_response_parse ()
gboolean | mbim_message_ms_sar_transmission_status_notification_parse ()

## Types and Values

| MbimSarConfigState
typedef | MbimSarConfigStateArray

## Description

This section implements support for requests, responses and notifications in the Ms Sar service.

## Functions

### mbim_sar_config_state_array_free ()

    void
    mbim_sar_config_state_array_free (MbimSarConfigStateArray *array);

Frees the memory allocated for the array of MbimSarConfigState structs.

#### Parameters

array | a NULL terminated array of MbimSarConfigState structs. |

Since: 1.26

### mbim_message_ms_sar_config_query_new ()

    MbimMessage *
    mbim_message_ms_sar_config_query_new (GError **error);

Create a new request for the 'Config' query command in the 'MS SAR' service.

#### Parameters

error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_sar_config_set_new ()

    MbimMessage *
    mbim_message_ms_sar_config_set_new (MbimSarControlMode mode,
                                        MbimSarBackoffState backoff_state,
                                        guint32 config_states_count,
                                        const MbimSarConfigState *const *config_states,
                                        GError **error);

Create a new request for the 'Config' set command in the 'MS SAR' service.

#### Parameters

mode | the 'Mode' field, given as a MbimSarControlMode. | [in]
backoff_state | the 'BackoffState' field, given as a MbimSarBackoffState. | [in]
config_states_count | the 'ConfigStatesCount' field, given as a guint32. | [in]
config_states | the 'ConfigStates' field, given as an array of MbimSarConfigState items. | [in][array zero-terminated=1][element-type MbimSarConfigState]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_sar_config_response_parse ()

    gboolean
    mbim_message_ms_sar_config_response_parse
                                   (const MbimMessage *message,
                                    MbimSarControlMode *out_mode,
                                    MbimSarBackoffState *out_backoff_state,
                                    MbimSarWifiHardwareState *out_wifi_integration,
                                    guint32 *out_config_states_count,
                                    MbimSarConfigStateArray **out_config_states,
                                    GError **error);

Parses and returns parameters of the 'Config' response command in the 'MS SAR' service.

#### Parameters

message | the MbimMessage. |
out_mode | return location for a MbimSarControlMode, or `NULL` if the 'Mode' field is not needed. | [out][optional][transfer none]
out_backoff_state | return location for a MbimSarBackoffState, or `NULL` if the 'BackoffState' field is not needed. | [out][optional][transfer none]
out_wifi_integration | return location for a MbimSarWifiHardwareState, or `NULL` if the 'WifiIntegration' field is not needed. | [out][optional][transfer none]
out_config_states_count | return location for a guint32, or `NULL` if the 'ConfigStatesCount' field is not needed. | [out][optional][transfer none]
out_config_states | return location for a newly allocated array of MbimSarConfigState items, or `NULL` if the 'ConfigStates' field is not needed. Free the returned value with `mbim_sar_config_state_array_free()`. | [out][optional][transfer full][array zero-terminated=1][element-type MbimSarConfigState]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_sar_transmission_status_query_new ()

    MbimMessage *
    mbim_message_ms_sar_transmission_status_query_new
                                   (GError **error);

Create a new request for the 'Transmission status' query command in the 'MS SAR' service.

#### Parameters

error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_sar_transmission_status_set_new ()

    MbimMessage *
    mbim_message_ms_sar_transmission_status_set_new
                                   (MbimTransmissionNotificationStatus channel_notification,
                                    guint32 hysteresis_timer,
                                    GError **error);

Create a new request for the 'Transmission status' set command in the 'MS SAR' service.

#### Parameters

channel_notification | the 'ChannelNotification' field, given as a MbimTransmissionNotificationStatus. | [in]
hysteresis_timer | the 'HysteresisTimer' field, given as a guint32. | [in]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_sar_transmission_status_response_parse ()

    gboolean
    mbim_message_ms_sar_transmission_status_response_parse
                                   (const MbimMessage *message,
                                    MbimTransmissionNotificationStatus *out_channel_notification,
                                    MbimTransmissionState *out_transmission_status,
                                    guint32 *out_hysteresis_timer,
                                    GError **error);

Parses and returns parameters of the 'Transmission status' response command in the 'MS SAR' service.

#### Parameters

message | the MbimMessage. |
out_channel_notification | return location for a MbimTransmissionNotificationStatus, or `NULL` if the 'ChannelNotification' field is not needed. | [out][optional][transfer none]
out_transmission_status | return location for a MbimTransmissionState, or `NULL` if the 'TransmissionStatus' field is not needed. | [out][optional][transfer none]
out_hysteresis_timer | return location for a guint32, or `NULL` if the 'HysteresisTimer' field is not needed. | [out][optional][transfer none]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_sar_transmission_status_notification_parse ()

    gboolean
    mbim_message_ms_sar_transmission_status_notification_parse
                                   (const MbimMessage *message,
                                    MbimTransmissionNotificationStatus *out_channel_notification,
                                    MbimTransmissionState *out_transmission_status,
                                    guint32 *out_hysteresis_timer,
                                    GError **error);

Parses and returns parameters of the 'Transmission status' notification command in the 'MS SAR' service.

#### Parameters

message | the MbimMessage. |
out_channel_notification | return location for a MbimTransmissionNotificationStatus, or `NULL` if the 'ChannelNotification' field is not needed. | [out][optional][transfer none]
out_transmission_status | return location for a MbimTransmissionState, or `NULL` if the 'TransmissionStatus' field is not needed. | [out][optional][transfer none]
out_hysteresis_timer | return location for a guint32, or `NULL` if the 'HysteresisTimer' field is not needed. | [out][optional][transfer none]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

## Types and Values

### MbimSarConfigState

    typedef struct {
        guint32 antenna_index;
        guint32 backoff_index;
    } MbimSarConfigState;

A MbimSarConfigState element.

#### Members

guint32 `antenna_index`; | a guint32. |
guint32 `backoff_index`; | a guint32. |

Since: 1.26

### MbimSarConfigStateArray

    typedef MbimSarConfigState *MbimSarConfigStateArray;

A NULL-terminated array of MbimSarConfigState elements.

Since: 1.26