/* Attribute read call back for the Aggregate Format attribute.  */
static ssize_t read_agg_format(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
/* Attribute read call back for the Aggregate Format attribute.  */
static ssize_t read_agg_format(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
{
	const struct agg_format_t *value = attr->user_data;
	struct agg_format_t agg_format_conv;
	agg_format_conv.field_a = sys_cpu_to_le16(value->field_a);
	agg_format_conv.field_b = sys_cpu_to_le16(value->field_b);
	agg_format_conv.field_c = sys_cpu_to_le16(value->field_c);
	return bt_gatt_attr_read(conn, attr, buf, len, offset, &agg_format_conv,
				 sizeof(agg_format_conv));
}