/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: ssc-sensor-proximity.proto */

#ifndef PROTOBUF_C_ssc_2dsensor_2dproximity_2eproto__INCLUDED
#define PROTOBUF_C_ssc_2dsensor_2dproximity_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif


typedef struct SscProximityResponse SscProximityResponse;
typedef struct SscProximityResponseDavinci SscProximityResponseDavinci;


/* --- enums --- */


/* --- messages --- */

/*
 * Proximity Sensor specific response data.
 * @near: in-proximity or not, NEAR = 1, FAR = 0.
 * @distance: raw distance from sensor, vendor-specific.
 * @accuracy: how reliable the value is [0, 3]. Higher is more accurate, 0 is unreliable.
 */
struct  SscProximityResponse
{
  ProtobufCMessage base;
  int32_t near;
  int32_t distance;
  int32_t accuracy;
};
#define SSC_PROXIMITY_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ssc_proximity_response__descriptor) \
, 0, 0, 0 }


/*
 * Proximity Sensor specific response data, as seen on Xiaomi Mi 9T / Redmi K20 (xiaomi-davinci).
 * @data: measurement data, a C struct as raw bytes.
 * @accuracy: how reliable the value is [0, 3]. Higher is more accurate, 0 is unreliable.
 */
struct  SscProximityResponseDavinci
{
  ProtobufCMessage base;
  size_t n_data;
  ProtobufCBinaryData *data;
  int32_t accuracy;
};
#define SSC_PROXIMITY_RESPONSE_DAVINCI__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ssc_proximity_response_davinci__descriptor) \
, 0,NULL, 0 }


/* SscProximityResponse methods */
void   ssc_proximity_response__init
                     (SscProximityResponse         *message);
size_t ssc_proximity_response__get_packed_size
                     (const SscProximityResponse   *message);
size_t ssc_proximity_response__pack
                     (const SscProximityResponse   *message,
                      uint8_t             *out);
size_t ssc_proximity_response__pack_to_buffer
                     (const SscProximityResponse   *message,
                      ProtobufCBuffer     *buffer);
SscProximityResponse *
       ssc_proximity_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ssc_proximity_response__free_unpacked
                     (SscProximityResponse *message,
                      ProtobufCAllocator *allocator);
/* SscProximityResponseDavinci methods */
void   ssc_proximity_response_davinci__init
                     (SscProximityResponseDavinci         *message);
size_t ssc_proximity_response_davinci__get_packed_size
                     (const SscProximityResponseDavinci   *message);
size_t ssc_proximity_response_davinci__pack
                     (const SscProximityResponseDavinci   *message,
                      uint8_t             *out);
size_t ssc_proximity_response_davinci__pack_to_buffer
                     (const SscProximityResponseDavinci   *message,
                      ProtobufCBuffer     *buffer);
SscProximityResponseDavinci *
       ssc_proximity_response_davinci__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ssc_proximity_response_davinci__free_unpacked
                     (SscProximityResponseDavinci *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*SscProximityResponse_Closure)
                 (const SscProximityResponse *message,
                  void *closure_data);
typedef void (*SscProximityResponseDavinci_Closure)
                 (const SscProximityResponseDavinci *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor ssc_proximity_response__descriptor;
extern const ProtobufCMessageDescriptor ssc_proximity_response_davinci__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_ssc_2dsensor_2dproximity_2eproto__INCLUDED */
