<commit_before>/* Open Sensor Platform Project
 * https://github.com/sensorplatforms/open-sensor-platform
 *
 * Copyright (C) 2013 Sensor Platforms Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef FREEMOTION_RPC_H
#define FREEMOTION_RPC_H

#include <stdint.h>

//// Sensor Types from Android
#define SENSOR_TYPE_META_DATA                        (0)
#define SENSOR_TYPE_ACCELEROMETER                    (1)
#define SENSOR_TYPE_GEOMAGNETIC_FIELD                (2)
#define SENSOR_TYPE_MAGNETIC_FIELD  SENSOR_TYPE_GEOMAGNETIC_FIELD
#define SENSOR_TYPE_ORIENTATION                      (3)
#define SENSOR_TYPE_GYROSCOPE                        (4)
#define SENSOR_TYPE_LIGHT                            (5)
#define SENSOR_TYPE_PRESSURE                         (6)
#define SENSOR_TYPE_TEMPERATURE                      (7)
#define SENSOR_TYPE_PROXIMITY                        (8)
#define SENSOR_TYPE_GRAVITY                          (9)
#define SENSOR_TYPE_LINEAR_ACCELERATION             (10)
#define SENSOR_TYPE_ROTATION_VECTOR                 (11)
#define SENSOR_TYPE_RELATIVE_HUMIDITY               (12)
#define SENSOR_TYPE_AMBIENT_TEMPERATURE             (13)
#define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED     (14)
#define SENSOR_TYPE_GAME_ROTATION_VECTOR            (15)
#define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED          (16)
#define SENSOR_TYPE_SIGNIFICANT_MOTION              (17)
#define SENSOR_TYPE_STEP_DETECTOR                   (18)
#define SENSOR_TYPE_STEP_COUNTER                    (19)
#define SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR     (20)
#define COUNT_OF_SENSOR_TYPES                       (SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR+1)

////
typedef struct {
    double timestamp;
    float data[3];
} FMRPC_ThreeAxisData_t;

typedef int OSP_STATUS_t;
#define OSP_STATUS_OK       (  0)
#define OSP_STATUS_ERROR    ( -1)

typedef void (*FMRPC_ResultDataCallback_t)(uint32_t sensorType, void* data);


OSP_STATUS_t FMRPC_Initialize(void);

OSP_STATUS_t FMRPC_GetVersion(char* versionString, int bufSize);

OSP_STATUS_t FMRPC_SubscribeResult(uint32_t sensorType, FMRPC_ResultDataCallback_t dataReadyCallback );
OSP_STATUS_t FMRPC_UnsubscribeResult(uint32_t sensorType);


OSP_STATUS_t FMRPC_Deinitialize(void);


#endif // FREEMOTION_RPC_H<commit_msg>Added new error code<commit_after>/* Open Sensor Platform Project
 * https://github.com/sensorplatforms/open-sensor-platform
 *
 * Copyright (C) 2013 Sensor Platforms Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef FREEMOTION_RPC_H
#define FREEMOTION_RPC_H

#include <stdint.h>

//// Sensor Types from Android
#define SENSOR_TYPE_META_DATA                        (0)
#define SENSOR_TYPE_ACCELEROMETER                    (1)
#define SENSOR_TYPE_GEOMAGNETIC_FIELD                (2)
#define SENSOR_TYPE_MAGNETIC_FIELD  SENSOR_TYPE_GEOMAGNETIC_FIELD
#define SENSOR_TYPE_ORIENTATION                      (3)
#define SENSOR_TYPE_GYROSCOPE                        (4)
#define SENSOR_TYPE_LIGHT                            (5)
#define SENSOR_TYPE_PRESSURE                         (6)
#define SENSOR_TYPE_TEMPERATURE                      (7)
#define SENSOR_TYPE_PROXIMITY                        (8)
#define SENSOR_TYPE_GRAVITY                          (9)
#define SENSOR_TYPE_LINEAR_ACCELERATION             (10)
#define SENSOR_TYPE_ROTATION_VECTOR                 (11)
#define SENSOR_TYPE_RELATIVE_HUMIDITY               (12)
#define SENSOR_TYPE_AMBIENT_TEMPERATURE             (13)
#define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED     (14)
#define SENSOR_TYPE_GAME_ROTATION_VECTOR            (15)
#define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED          (16)
#define SENSOR_TYPE_SIGNIFICANT_MOTION              (17)
#define SENSOR_TYPE_STEP_DETECTOR                   (18)
#define SENSOR_TYPE_STEP_COUNTER                    (19)
#define SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR     (20)
#define COUNT_OF_SENSOR_TYPES                       (SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR+1)

////
typedef struct {
    double timestamp;
    float data[3];
} FMRPC_ThreeAxisData_t;

typedef int OSP_STATUS_t;
#define OSP_STATUS_OK                               ( 0)
#define OSP_STATUS_ERROR                            (-1)
#define OSP_STATUS_UNKNOWN_INPUT                    (-2)

typedef void (*FMRPC_ResultDataCallback_t)(uint32_t sensorType, void* data);


OSP_STATUS_t FMRPC_Initialize(void);

OSP_STATUS_t FMRPC_GetVersion(char* versionString, int bufSize);

OSP_STATUS_t FMRPC_SubscribeResult(uint32_t sensorType, FMRPC_ResultDataCallback_t dataReadyCallback );
OSP_STATUS_t FMRPC_UnsubscribeResult(uint32_t sensorType);


OSP_STATUS_t FMRPC_Deinitialize(void);


#endif // FREEMOTION_RPC_H
{'fraction_non_alphanumeric': 0.06502636203866433, 'fraction_numerical': 0.017750439367311074, 'mean_word_length': 2.889952153110048, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6954429', 'n_tokens_mistral': 1933, 'n_tokens_neox': 1863, 'n_words': 425}