示例#1
0
    PB_FIELD(  3, STRING  , OPTIONAL, STATIC  , OTHER, grpc_lb_v1_Server, load_balance_token, port, 0),
    PB_FIELD(  4, BOOL    , OPTIONAL, STATIC  , OTHER, grpc_lb_v1_Server, drop_request, load_balance_token, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v1_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server)
#endif


示例#2
0
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.1.7-dev at Tue Nov 13 15:12:47 2012. */

#include "command.pb.h"

const pb_field_t SensorData_fields[5] = {
    {1, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_STRING),
    offsetof(SensorData, type), 0,
    pb_membersize(SensorData, type), 0, 0},

    {2, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_STRING),
    pb_delta_end(SensorData, description, type), 0,
    pb_membersize(SensorData, description), 0, 0},

    {3, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_VARINT),
    pb_delta_end(SensorData, address, description), 0,
    pb_membersize(SensorData, address), 0, 0},

    {4, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_VARINT),
    pb_delta_end(SensorData, value, address), 0,
    pb_membersize(SensorData, value), 0, 0},

    PB_LAST_FIELD
};

const pb_field_t DriveSignals_fields[4] = {
    {1, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_VARINT),
    offsetof(DriveSignals, forward), 0,
    pb_membersize(DriveSignals, forward), 0, 0},

    {2, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_VARINT),
示例#3
0
    PB_FIELD(  3, INT32   , OPTIONAL, STATIC  , OTHER, shedBoat_Debug, motor_1_throttle_compensation, speed_over_ground_compensation, 0),
    PB_FIELD(  4, INT32   , OPTIONAL, STATIC  , OTHER, shedBoat_Debug, motor_2_throttle_compensation, motor_1_throttle_compensation, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(shedBoat_Telemetry, location) < 65536 && pb_membersize(shedBoat_Telemetry, motor[0]) < 65536 && pb_membersize(shedBoat_Telemetry, battery) < 65536 && pb_membersize(shedBoat_Telemetry, debug) < 65536 && pb_membersize(shedBoat_Battery, cell[0]) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_shedBoat_Telemetry_shedBoat_Location_shedBoat_Motor_shedBoat_Battery_shedBoat_Battery_Cell_shedBoat_Debug)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(shedBoat_Telemetry, location) < 256 && pb_membersize(shedBoat_Telemetry, motor[0]) < 256 && pb_membersize(shedBoat_Telemetry, battery) < 256 && pb_membersize(shedBoat_Telemetry, debug) < 256 && pb_membersize(shedBoat_Battery, cell[0]) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_shedBoat_Telemetry_shedBoat_Location_shedBoat_Motor_shedBoat_Battery_shedBoat_Battery_Cell_shedBoat_Debug)
#endif


/* @@protoc_insertion_point(eof) */
示例#4
0
    PB_FIELD(  1, UINT32  , REQUIRED, STATIC  , FIRST, SensorUpdate, timestamp, timestamp, 0),
    PB_FIELD(  2, MESSAGE , REPEATED, CALLBACK, OTHER, SensorUpdate, messages, timestamp, &SensorMessage_fields),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(DeviceInfo, sensors) < 65536 && pb_membersize(DeviceConfiguration, sensors) < 65536 && pb_membersize(DeviceControl, config) < 65536 && pb_membersize(SensorUpdate, messages) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Sensor_DeviceInfo_SensorConfiguration_DeviceConfiguration_DeviceControl_SensorMessage_SensorUpdate)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(DeviceInfo, sensors) < 256 && pb_membersize(DeviceConfiguration, sensors) < 256 && pb_membersize(DeviceControl, config) < 256 && pb_membersize(SensorUpdate, messages) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_Sensor_DeviceInfo_SensorConfiguration_DeviceConfiguration_DeviceControl_SensorMessage_SensorUpdate)
#endif


示例#5
0
    PB_LAST_FIELD
};

const pb_field_t GCSData_fields[8] = {
    PB_FIELD2( 19, MESSAGE , OPTIONAL, STATIC, FIRST, GCSData, EulerAngles, EulerAngles, &EulerAngles_t_fields),
    PB_FIELD2( 20, MESSAGE , OPTIONAL, STATIC, OTHER, GCSData, Axes, EulerAngles, &Axes_t_fields),
    PB_FIELD2( 21, MESSAGE , OPTIONAL, STATIC, OTHER, GCSData, GPS, Axes, &GPS_t_fields),
    PB_FIELD2( 22, MESSAGE , OPTIONAL, STATIC, OTHER, GCSData, Control, GPS, &Control_t_fields),
    PB_FIELD2( 23, MESSAGE , OPTIONAL, STATIC, OTHER, GCSData, PID, Control, &PID_t_fields),
    PB_FIELD2( 24, INT32   , REPEATED, CALLBACK, OTHER, GCSData, waypoint, PID, 0),
    PB_FIELD2( 25, INT32   , OPTIONAL, STATIC, OTHER, GCSData, battery, waypoint, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(GCSData, EulerAngles) < 256 && pb_membersize(GCSData, Axes) < 256 && pb_membersize(GCSData, GPS) < 256 && pb_membersize(GCSData, Control) < 256 && pb_membersize(GCSData, PID) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_EulerAngles_t_Axes_t_GPS_t_Control_t_PID_t_GCSData)
#endif

#if !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(GCSData, EulerAngles) < 65536 && pb_membersize(GCSData, Axes) < 65536 && pb_membersize(GCSData, GPS) < 65536 && pb_membersize(GCSData, Control) < 65536 && pb_membersize(GCSData, PID) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_EulerAngles_t_Axes_t_GPS_t_Control_t_PID_t_GCSData)
#endif

/* On some platforms (such as AVR), double is really float.
 * These are not directly supported by nanopb, but see example_avr_double.
 * To get rid of this error, remove any double fields from your .proto.
 */
STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)

示例#6
0
const pb_field_t settings_t_fields[3] = {
    PB_FIELD2(  1, MESSAGE , REQUIRED, STATIC, FIRST, settings_t, data, data, &Settings_data_fields),
    PB_FIELD2(  2, UINT32  , REQUIRED, STATIC, OTHER, settings_t, CRCValue, data, 0),
    PB_LAST_FIELD
};

const pb_field_t status_t_fields[5] = {
    PB_FIELD2(  1, BOOL    , REQUIRED, STATIC, FIRST, status_t, shifting, shifting, 0),
    PB_FIELD2(  2, BOOL    , REQUIRED, STATIC, OTHER, status_t, slipping, shifting, 0),
    PB_FIELD2(  3, UINT32  , REQUIRED, STATIC, OTHER, status_t, slipping_pct, slipping, 0),
    PB_FIELD2(  4, UINT32  , REQUIRED, STATIC, OTHER, status_t, acceleration, slipping_pct, 0),
    PB_LAST_FIELD
};

const pb_field_t light_settings_t_fields[3] = {
    PB_FIELD2(  1, UINT32  , REQUIRED, STATIC, FIRST, light_settings_t, state, state, 0),
    PB_FIELD2(  2, UINT32  , REQUIRED, STATIC, OTHER, light_settings_t, duration, state, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(settings_t, data) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_Info_sensors_t_Settings_data_settings_t_status_t_light_settings_t)
#endif

#if !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(settings_t, data) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Info_sensors_t_Settings_data_settings_t_status_t_light_settings_t)
#endif

示例#7
0
    PB_ONEOF_FIELD(document_type,   1, MESSAGE , ONEOF, STATIC  , FIRST, firestore_client_MaybeDocument, no_document, no_document, &firestore_client_NoDocument_fields),
    PB_ONEOF_FIELD(document_type,   2, MESSAGE , ONEOF, STATIC  , UNION, firestore_client_MaybeDocument, document, document, &google_firestore_v1beta1_Document_fields),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(firestore_client_NoDocument, read_time) < 65536 && pb_membersize(firestore_client_MaybeDocument, document_type.no_document) < 65536 && pb_membersize(firestore_client_MaybeDocument, document_type.document) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_NoDocument_firestore_client_MaybeDocument)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(firestore_client_NoDocument, read_time) < 256 && pb_membersize(firestore_client_MaybeDocument, document_type.no_document) < 256 && pb_membersize(firestore_client_MaybeDocument, document_type.document) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_NoDocument_firestore_client_MaybeDocument)
#endif


/* @@protoc_insertion_point(eof) */
示例#8
0
const pb_field_t uavforge_AckPacket_fields[2] = {
    PB_FIELD(  1, UINT64  , REQUIRED, STATIC  , FIRST, uavforge_AckPacket, ackTimestamp, ackTimestamp, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(uavforge_Packet, contents.telem) < 65536 && pb_membersize(uavforge_ActionPacket, waypoints) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_uavforge_Packet_uavforge_TelemetryPacket_uavforge_ActionPacket_uavforge_ActionPacket_WaypointPacket_uavforge_InfoPacket_uavforge_AckPacket)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(uavforge_Packet, contents.telem) < 256 && pb_membersize(uavforge_ActionPacket, waypoints) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_uavforge_Packet_uavforge_TelemetryPacket_uavforge_ActionPacket_uavforge_ActionPacket_WaypointPacket_uavforge_InfoPacket_uavforge_AckPacket)
#endif


/* On some platforms (such as AVR), double is really float.
示例#9
0
    PB_FIELD(  3, FLOAT   , REQUIRED, STATIC  , OTHER, TempAccelData, roll, pitch, 0),
    PB_FIELD(  4, FLOAT   , REQUIRED, STATIC  , OTHER, TempAccelData, temp, roll, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(Rs485, ow[0]) < 65536 && pb_membersize(Rs485, ad[0]) < 65536 && pb_membersize(Rs485, tad[0]) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Rs485_OwData_AnalogData_TempAccelData)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(Rs485, ow[0]) < 256 && pb_membersize(Rs485, ad[0]) < 256 && pb_membersize(Rs485, tad[0]) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_Rs485_OwData_AnalogData_TempAccelData)
#endif


/* @@protoc_insertion_point(eof) */
示例#10
0
const pb_field_t DebugLinkStop_fields[1] = {
    PB_LAST_FIELD
};

const pb_field_t DebugLinkLog_fields[4] = {
    PB_FIELD2(  1, UINT32  , OPTIONAL, STATIC  , FIRST, DebugLinkLog, level, level, 0),
    PB_FIELD2(  2, STRING  , OPTIONAL, STATIC  , OTHER, DebugLinkLog, bucket, level, 0),
    PB_FIELD2(  3, STRING  , OPTIONAL, STATIC  , OTHER, DebugLinkLog, text, bucket, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
STATIC_ASSERT((pb_membersize(Features, coins[0]) < 65536 && pb_membersize(PublicKey, node) < 65536 && pb_membersize(LoadDevice, node) < 65536 && pb_membersize(SimpleSignTx, inputs[0]) < 65536 && pb_membersize(SimpleSignTx, outputs[0]) < 65536 && pb_membersize(SimpleSignTx, transactions[0]) < 65536 && pb_membersize(TxRequest, details) < 65536 && pb_membersize(TxRequest, serialized) < 65536 && pb_membersize(TxAck, tx) < 65536 && pb_membersize(DebugLinkState, node) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Initialize_Features_ClearSession_ApplySettings_ChangePin_Ping_Success_Failure_ButtonRequest_ButtonAck_PinMatrixRequest_PinMatrixAck_Cancel_PassphraseRequest_PassphraseAck_GetEntropy_Entropy_GetPublicKey_PublicKey_GetAddress_Address_WipeDevice_LoadDevice_ResetDevice_EntropyRequest_EntropyAck_RecoveryDevice_WordRequest_WordAck_SignMessage_VerifyMessage_MessageSignature_EncryptMessage_DecryptMessage_CipherKeyValue_EstimateTxSize_TxSize_SignTx_SimpleSignTx_TxRequest_TxAck_FirmwareErase_FirmwareUpload_DebugLinkDecision_DebugLinkGetState_DebugLinkState_DebugLinkStop_DebugLinkLog)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
#error Field descriptor for Success.payload is too large. Define PB_FIELD_16BIT to fix this.
#endif


示例#11
0
};

const pb_field_t openxc_TranslatedNumericMessage_fields[3] = {
    PB_FIELD2(  1, STRING  , OPTIONAL, STATIC, FIRST, openxc_TranslatedNumericMessage, name, name, 0),
    PB_FIELD2(  2, DOUBLE  , OPTIONAL, STATIC, OTHER, openxc_TranslatedNumericMessage, value, name, 0),
    PB_LAST_FIELD
};

const pb_field_t openxc_TranslatedBooleanMessage_fields[3] = {
    PB_FIELD2(  1, STRING  , OPTIONAL, STATIC, FIRST, openxc_TranslatedBooleanMessage, name, name, 0),
    PB_FIELD2(  2, BOOL    , OPTIONAL, STATIC, OTHER, openxc_TranslatedBooleanMessage, value, name, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 256 && pb_membersize(openxc_VehicleMessage, string_message) < 256 && pb_membersize(openxc_VehicleMessage, numerical_message) < 256 && pb_membersize(openxc_VehicleMessage, boolean_message) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage)
#endif

#if !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(openxc_VehicleMessage, raw_message) < 65536 && pb_membersize(openxc_VehicleMessage, string_message) < 65536 && pb_membersize(openxc_VehicleMessage, numerical_message) < 65536 && pb_membersize(openxc_VehicleMessage, boolean_message) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_openxc_VehicleMessage_openxc_RawMessage_openxc_TranslatedStringMessage_openxc_TranslatedNumericMessage_openxc_TranslatedBooleanMessage)
#endif

/* On some platforms (such as AVR), double is really float.
 * These are not directly supported by nanopb, but see example_avr_double.
 * To get rid of this error, remove any double fields from your .proto.
 */
STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)

示例#12
0
/* Automatically generated nanopb constant definitions */
#include "potentiometer.pb.h"



const pb_field_t potentiometer_In_fields[2] = {
    {1, PB_HTYPE_REQUIRED | PB_LTYPE_VARINT,
    offsetof(potentiometer_In, value), 0,
    pb_membersize(potentiometer_In, value), 0, 0},

    PB_LAST_FIELD
};

const pb_field_t potentiometer_Out_fields[3] = {
    {1, PB_HTYPE_REQUIRED | PB_LTYPE_VARINT,
    offsetof(potentiometer_Out, value), 0,
    pb_membersize(potentiometer_Out, value), 0, 0},

    {2, PB_HTYPE_OPTIONAL | PB_LTYPE_VARINT,
    pb_delta_end(potentiometer_Out, temperature, value),
    pb_delta(potentiometer_Out, has_temperature, temperature),
    pb_membersize(potentiometer_Out, temperature), 0, 0},

    PB_LAST_FIELD
};

    PB_FIELD(  2, BOOL    , REQUIRED, STATIC  , OTHER, grSim_Commands, isteamyellow, timestamp, 0),
    PB_FIELD(  3, MESSAGE , REPEATED, CALLBACK, OTHER, grSim_Commands, robot_commands, isteamyellow, &grSim_Robot_Command_fields),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(grSim_Commands, robot_commands) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grSim_Robot_Command_grSim_Commands)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(grSim_Commands, robot_commands) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grSim_Robot_Command_grSim_Commands)
#endif


/* On some platforms (such as AVR), double is really float.
const pb_field_t GetEntropy_fields[2] = {
    PB_FIELD(  1, UINT32  , REQUIRED, STATIC, GetEntropy, number_of_bytes, number_of_bytes, 0),
    PB_LAST_FIELD
};

const pb_field_t Entropy_fields[2] = {
    PB_FIELD(  1, BYTES   , REQUIRED, CALLBACK, Entropy, entropy, entropy, 0),
    PB_LAST_FIELD
};

const pb_field_t GetMasterPublicKey_fields[1] = {
    PB_LAST_FIELD
};

const pb_field_t MasterPublicKey_fields[3] = {
    PB_FIELD(  1, BYTES   , REQUIRED, STATIC, MasterPublicKey, public_key, public_key, 0),
    PB_FIELD(  2, BYTES   , REQUIRED, STATIC, MasterPublicKey, chain_code, public_key, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(Wallets, wallet_info) < 256 && pb_membersize(RestoreWallet, new_wallet) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_Ping_PingResponse_Success_Failure_NewWallet_NewAddress_Address_GetNumberOfAddresses_NumberOfAddresses_GetAddressAndPublicKey_SignTransaction_Signature_LoadWallet_UnloadWallet_FormatWalletArea_ChangeEncryptionKey_ChangeWalletName_ListWallets_WalletInfo_Wallets_BackupWallet_RestoreWallet_GetDeviceUUID_DeviceUUID_GetEntropy_Entropy_GetMasterPublicKey_MasterPublicKey)
#endif

#if !defined(PB_FIELD_32BIT)
STATIC_ASSERT((pb_membersize(Wallets, wallet_info) < 65536 && pb_membersize(RestoreWallet, new_wallet) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Ping_PingResponse_Success_Failure_NewWallet_NewAddress_Address_GetNumberOfAddresses_NumberOfAddresses_GetAddressAndPublicKey_SignTransaction_Signature_LoadWallet_UnloadWallet_FormatWalletArea_ChangeEncryptionKey_ChangeWalletName_ListWallets_WalletInfo_Wallets_BackupWallet_RestoreWallet_GetDeviceUUID_DeviceUUID_GetEntropy_Entropy_GetMasterPublicKey_MasterPublicKey)
#endif

示例#15
0
    PB_FIELD(  6, UINT32  , OPTIONAL, STATIC  , OTHER, RPCMessage, result, args, 0),
    PB_FIELD(  7, ENUM    , OPTIONAL, STATIC  , OTHER, RPCMessage, error, result, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(RPCMessage, method) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_MethodInfo_RPCMessage)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(RPCMessage, method) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_MethodInfo_RPCMessage)
#endif


示例#16
0
    PB_FIELD2(  8, STRING  , OPTIONAL, STATIC  , OTHER, Storage, label, language, 0),
    PB_FIELD2(  9, BOOL    , OPTIONAL, STATIC  , OTHER, Storage, imported, label, 0),
    PB_LAST_FIELD
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
STATIC_ASSERT((pb_membersize(Storage, node) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Storage)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
STATIC_ASSERT((pb_membersize(Storage, node) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_Storage)
#endif


示例#17
0
};





/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(onnx_TensorProto, segment) < 65536 && pb_membersize(onnx_SparseTensorProto, indices) < 65536 && pb_membersize(onnx_SparseTensorProto, values) < 65536 && pb_membersize(onnx_TypeProto, sparse_tensor_type) < 65536 && pb_membersize(onnx_TypeProto_SparseTensorTypeProto, shape) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_onnx_AttributeProto_onnx_ValueInfoProto_onnx_NodeProto_onnx_ModelProto_onnx_GraphProto_onnx_TensorProto_onnx_TensorProto_Segment_onnx_SparseTensorProto_onnx_TypeProto_onnx_TypeProto_TensorShapeProto_onnx_TypeProto_TensorShapeProto_Dimension_onnx_TypeProto_TensorTypeProto_onnx_TypeProto_SparseTensorTypeProto_onnx_OperatorSetIdProto)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in the default
 * 8 bit descriptors.
 */
PB_STATIC_ASSERT((pb_membersize(onnx_TensorProto, segment) < 256 && pb_membersize(onnx_SparseTensorProto, indices) < 256 && pb_membersize(onnx_SparseTensorProto, values) < 256 && pb_membersize(onnx_TypeProto, sparse_tensor_type) < 256 && pb_membersize(onnx_TypeProto_SparseTensorTypeProto, shape) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_onnx_AttributeProto_onnx_ValueInfoProto_onnx_NodeProto_onnx_ModelProto_onnx_GraphProto_onnx_TensorProto_onnx_TensorProto_Segment_onnx_SparseTensorProto_onnx_TypeProto_onnx_TypeProto_TensorShapeProto_onnx_TypeProto_TensorShapeProto_Dimension_onnx_TypeProto_TensorTypeProto_onnx_TypeProto_SparseTensorTypeProto_onnx_OperatorSetIdProto)
#endif


/* On some platforms (such as AVR), double is really float.
示例#18
0
    bool wire_debug_out;
} wire_debug_out_struct;

static const pb_field_t wire_debug_out_field = 
      PB_FIELD2(50005, BOOL    , OPTEXT, STATIC  , FIRST, wire_debug_out_struct, wire_debug_out, wire_debug_out, 0);

const pb_extension_type_t wire_debug_out = {
    NULL,
    NULL,
    &wire_debug_out_field
};


/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
 * compile-time option. You can do that in pb.h or on compiler command line.
 * 
 * The reason you need to do this is that some of your messages contain tag
 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
 * field descriptors.
 */
STATIC_ASSERT((pb_membersize(HDNodePathType, node) < 65536 && pb_membersize(MultisigRedeemScriptType, pubkeys[0]) < 65536 && pb_membersize(TxInputType, multisig) < 65536 && pb_membersize(TxOutputType, multisig) < 65536 && pb_membersize(TransactionType, inputs[0]) < 65536 && pb_membersize(TransactionType, bin_outputs[0]) < 65536 && pb_membersize(TransactionType, outputs[0]) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_HDNodeType_HDNodePathType_CoinType_MultisigRedeemScriptType_TxInputType_TxOutputType_TxOutputBinType_TransactionType_TxRequestDetailsType_TxRequestSerializedType_IdentityType)
#endif

#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
#error Field descriptor for TxRequestSerializedType.serialized_tx is too large. Define PB_FIELD_16BIT to fix this.
#endif


示例#19
0
文件: pmbus.pb.c 项目: metormote/node
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.1.9-dev at Fri Jan 18 14:24:46 2013. */

#include "pmbus.pb.h"



const pb_field_t pmbus_In_fields[3] = {
    {1, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_VARINT),
    offsetof(pmbus_In, pmbusAddress), 0,
    pb_membersize(pmbus_In, pmbusAddress), 0, 0},

    {2, (pb_type_t) ((int) PB_HTYPE_CALLBACK | (int) PB_LTYPE_SUBMESSAGE),
    pb_delta_end(pmbus_In, command, pmbusAddress), 0,
    pb_membersize(pmbus_In, command), 0,
    &pmbus_Command_fields},

    PB_LAST_FIELD
};

const pb_field_t pmbus_Out_fields[3] = {
    {1, (pb_type_t) ((int) PB_HTYPE_REQUIRED | (int) PB_LTYPE_VARINT),
    offsetof(pmbus_Out, pmbusAddress), 0,
    pb_membersize(pmbus_Out, pmbusAddress), 0, 0},

    {2, (pb_type_t) ((int) PB_HTYPE_CALLBACK | (int) PB_LTYPE_SUBMESSAGE),
    pb_delta_end(pmbus_Out, response, pmbusAddress), 0,
    pb_membersize(pmbus_Out, response), 0,
    &pmbus_Response_fields},

    PB_LAST_FIELD