<commit_before>#include <bluetoe/bindings/nrf51.hpp>
#include <bluetoe/services/csc.hpp>
#include <bluetoe/server.hpp>
#include <bluetoe/sensor_location.hpp>
#include <nrf.h>

static constexpr char server_name[] = "<NAME>";

struct handler {

    /*
     * Functions required by the bluetoe CSC implementation to support wheel and crank revolutions
     */
    std::pair< std::uint32_t, std::uint16_t > cumulative_wheel_revolutions_and_time()
    {
        return std::make_pair( wheel_revolutions_, last_wheel_event_time_ );
    }

    std::pair< std::uint16_t, std::uint16_t > cumulative_crank_revolutions_and_time()
    {
        return std::make_pair( crank_revolutions_, last_crank_event_time_ );
    }

    void set_cumulative_wheel_revolutions( std::uint32_t new_value );

    volatile std::uint32_t wheel_revolutions_;
    volatile std::uint16_t last_wheel_event_time_;

    volatile std::uint32_t crank_revolutions_;
    volatile std::uint16_t last_crank_event_time_;
};

using bicycle = bluetoe::server<
    bluetoe::server_name< server_name >,
    bluetoe::cycling_speed_and_cadence<
        bluetoe::sensor_location::hip,
        bluetoe::csc::wheel_revolution_data_supported,
        bluetoe::csc::crank_revolution_data_supported,
        bluetoe::csc::handler< handler >
    >
>;

bicycle gatt;

void handler::set_cumulative_wheel_revolutions( std::uint32_t new_value )
{<commit_msg>appearance<commit_after>#include <bluetoe/bindings/nrf51.hpp>
#include <bluetoe/services/csc.hpp>
#include <bluetoe/server.hpp>
#include <bluetoe/sensor_location.hpp>
#include <nrf.h>

struct handler {

    /*
     * Functions required by the bluetoe CSC implementation to support wheel and crank revolutions
     */
    std::pair< std::uint32_t, std::uint16_t > cumulative_wheel_revolutions_and_time()
    {
        return std::make_pair( wheel_revolutions_, last_wheel_event_time_ );
    }

    std::pair< std::uint16_t, std::uint16_t > cumulative_crank_revolutions_and_time()
    {
        return std::make_pair( crank_revolutions_, last_crank_event_time_ );
    }

    void set_cumulative_wheel_revolutions( std::uint32_t new_value );

    volatile std::uint32_t wheel_revolutions_;
    volatile std::uint16_t last_wheel_event_time_;

    volatile std::uint32_t crank_revolutions_;
    volatile std::uint16_t last_crank_event_time_;
};

static constexpr char server_name[] = "<NAME>";

using bicycle = bluetoe::server<
    bluetoe::server_name< server_name >,
    bluetoe::appearance::cycling_speed_and_cadence_sensor,
    bluetoe::cycling_speed_and_cadence<
        bluetoe::sensor_location::hip,
        bluetoe::csc::wheel_revolution_data_supported,
        bluetoe::csc::crank_revolution_data_supported,
        bluetoe::csc::handler< handler >
    >
>;

bicycle gatt;

void handler::set_cumulative_wheel_revolutions( std::uint32_t new_value )
{
{'fraction_non_alphanumeric': 0.10280701754385965, 'fraction_numerical': 0.015438596491228071, 'mean_word_length': 4.842213114754099, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4322702', 'n_tokens_mistral': 1047, 'n_tokens_neox': 982, 'n_words': 159}