-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FRI msg generated with new nanopb, includes fixed
- Loading branch information
Showing
12 changed files
with
829 additions
and
568 deletions.
There are no files selected for viewing
238 changes: 76 additions & 162 deletions
238
kuka_sunrise_fri_driver/src/fri_client_sdk/FRIMessages.pb.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,162 +1,76 @@ | ||
/* Automatically generated nanopb constant definitions */ | ||
/* Generated by nanopb-0.2.8 at Mon Jul 29 08:35:17 2019. */ | ||
|
||
#include "FRIMessages.pb.h" | ||
|
||
|
||
|
||
const pb_field_t JointValues_fields[2] = { | ||
PB_FIELD2( 1, DOUBLE , REPEATED, CALLBACK, FIRST, JointValues, value, value, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t TimeStamp_fields[3] = { | ||
PB_FIELD2( 1, UINT32 , REQUIRED, STATIC , FIRST, TimeStamp, sec, sec, 0), | ||
PB_FIELD2( 2, UINT32 , REQUIRED, STATIC , OTHER, TimeStamp, nanosec, sec, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t CartesianVector_fields[2] = { | ||
PB_FIELD2( 1, DOUBLE , REPEATED, STATIC , FIRST, CartesianVector, element, element, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t Checksum_fields[2] = { | ||
PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, Checksum, crc32, crc32, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t QuaternionTransformation_fields[4] = { | ||
PB_FIELD2( 1, STRING , REQUIRED, STATIC , FIRST, QuaternionTransformation, name, name, 0), | ||
PB_FIELD2( 2, DOUBLE , REPEATED, STATIC , OTHER, QuaternionTransformation, element, name, 0), | ||
PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, QuaternionTransformation, timestamp, element, &TimeStamp_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t FriIOValue_fields[6] = { | ||
PB_FIELD2( 1, STRING , REQUIRED, STATIC , FIRST, FriIOValue, name, name, 0), | ||
PB_FIELD2( 2, ENUM , REQUIRED, STATIC , OTHER, FriIOValue, type, name, 0), | ||
PB_FIELD2( 3, ENUM , REQUIRED, STATIC , OTHER, FriIOValue, direction, type, 0), | ||
PB_FIELD2( 4, UINT64 , OPTIONAL, STATIC , OTHER, FriIOValue, digitalValue, direction, 0), | ||
PB_FIELD2( 5, DOUBLE , OPTIONAL, STATIC , OTHER, FriIOValue, analogValue, digitalValue, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t RedundancyInformation_fields[3] = { | ||
PB_FIELD2( 1, ENUM , REQUIRED, STATIC , FIRST, RedundancyInformation, strategy, strategy, 0), | ||
PB_FIELD2( 2, DOUBLE , REQUIRED, STATIC , OTHER, RedundancyInformation, value, strategy, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t MessageHeader_fields[4] = { | ||
PB_FIELD2( 1, UINT32 , REQUIRED, STATIC , FIRST, MessageHeader, messageIdentifier, messageIdentifier, 0), | ||
PB_FIELD2( 2, UINT32 , REQUIRED, STATIC , OTHER, MessageHeader, sequenceCounter, messageIdentifier, 0), | ||
PB_FIELD2( 3, UINT32 , REQUIRED, STATIC , OTHER, MessageHeader, reflectedSequenceCounter, sequenceCounter, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t ConnectionInfo_fields[5] = { | ||
PB_FIELD2( 1, ENUM , REQUIRED, STATIC , FIRST, ConnectionInfo, sessionState, sessionState, 0), | ||
PB_FIELD2( 2, ENUM , REQUIRED, STATIC , OTHER, ConnectionInfo, quality, sessionState, 0), | ||
PB_FIELD2( 3, UINT32 , OPTIONAL, STATIC , OTHER, ConnectionInfo, sendPeriod, quality, 0), | ||
PB_FIELD2( 4, UINT32 , OPTIONAL, STATIC , OTHER, ConnectionInfo, receiveMultiplier, sendPeriod, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t RobotInfo_fields[6] = { | ||
PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, RobotInfo, numberOfJoints, numberOfJoints, 0), | ||
PB_FIELD2( 2, ENUM , OPTIONAL, STATIC , OTHER, RobotInfo, safetyState, numberOfJoints, 0), | ||
PB_FIELD2( 5, ENUM , REPEATED, CALLBACK, OTHER, RobotInfo, driveState, safetyState, 0), | ||
PB_FIELD2( 6, ENUM , OPTIONAL, STATIC , OTHER, RobotInfo, operationMode, driveState, 0), | ||
PB_FIELD2( 7, ENUM , OPTIONAL, STATIC , OTHER, RobotInfo, controlMode, operationMode, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t MessageMonitorData_fields[9] = { | ||
PB_FIELD2( 1, MESSAGE , OPTIONAL, STATIC , FIRST, MessageMonitorData, measuredJointPosition, measuredJointPosition, &JointValues_fields), | ||
PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, MessageMonitorData, measuredTorque, measuredJointPosition, &JointValues_fields), | ||
PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC , OTHER, MessageMonitorData, commandedTorque, measuredTorque, &JointValues_fields), | ||
PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC , OTHER, MessageMonitorData, externalTorque, commandedTorque, &JointValues_fields), | ||
PB_FIELD2( 8, MESSAGE , REPEATED, STATIC , OTHER, MessageMonitorData, readIORequest, externalTorque, &FriIOValue_fields), | ||
PB_FIELD2( 9, MESSAGE , OPTIONAL, STATIC , OTHER, MessageMonitorData, measuredCartesianPose, readIORequest, &QuaternionTransformation_fields), | ||
PB_FIELD2( 10, MESSAGE , OPTIONAL, STATIC , OTHER, MessageMonitorData, measuredRedundancyInformation, measuredCartesianPose, &RedundancyInformation_fields), | ||
PB_FIELD2( 15, MESSAGE , OPTIONAL, STATIC , OTHER, MessageMonitorData, timestamp, measuredRedundancyInformation, &TimeStamp_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t MessageIpoData_fields[7] = { | ||
PB_FIELD2( 1, MESSAGE , OPTIONAL, STATIC , FIRST, MessageIpoData, jointPosition, jointPosition, &JointValues_fields), | ||
PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, MessageIpoData, cartesianPose, jointPosition, &QuaternionTransformation_fields), | ||
PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, MessageIpoData, redundancyInformation, cartesianPose, &RedundancyInformation_fields), | ||
PB_FIELD2( 10, ENUM , OPTIONAL, STATIC , OTHER, MessageIpoData, clientCommandMode, redundancyInformation, 0), | ||
PB_FIELD2( 11, ENUM , OPTIONAL, STATIC , OTHER, MessageIpoData, overlayType, clientCommandMode, 0), | ||
PB_FIELD2( 12, DOUBLE , OPTIONAL, STATIC , OTHER, MessageIpoData, trackingPerformance, overlayType, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t MessageCommandData_fields[8] = { | ||
PB_FIELD2( 1, MESSAGE , OPTIONAL, STATIC , FIRST, MessageCommandData, jointPosition, jointPosition, &JointValues_fields), | ||
PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, MessageCommandData, cartesianWrenchFeedForward, jointPosition, &CartesianVector_fields), | ||
PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, MessageCommandData, jointTorque, cartesianWrenchFeedForward, &JointValues_fields), | ||
PB_FIELD2( 4, MESSAGE , REPEATED, STATIC , OTHER, MessageCommandData, commandedTransformations, jointTorque, &QuaternionTransformation_fields), | ||
PB_FIELD2( 5, MESSAGE , REPEATED, STATIC , OTHER, MessageCommandData, writeIORequest, commandedTransformations, &FriIOValue_fields), | ||
PB_FIELD2( 6, MESSAGE , OPTIONAL, STATIC , OTHER, MessageCommandData, cartesianPose, writeIORequest, &QuaternionTransformation_fields), | ||
PB_FIELD2( 7, MESSAGE , OPTIONAL, STATIC , OTHER, MessageCommandData, redundancyInformation, cartesianPose, &RedundancyInformation_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t MessageEndOf_fields[3] = { | ||
PB_FIELD2( 1, INT32 , OPTIONAL, STATIC , FIRST, MessageEndOf, messageLength, messageLength, 0), | ||
PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, MessageEndOf, messageChecksum, messageLength, &Checksum_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t FRIMonitoringMessage_fields[8] = { | ||
PB_FIELD2( 1, MESSAGE , REQUIRED, STATIC , FIRST, FRIMonitoringMessage, header, header, &MessageHeader_fields), | ||
PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, FRIMonitoringMessage, robotInfo, header, &RobotInfo_fields), | ||
PB_FIELD2( 3, MESSAGE , OPTIONAL, STATIC , OTHER, FRIMonitoringMessage, monitorData, robotInfo, &MessageMonitorData_fields), | ||
PB_FIELD2( 4, MESSAGE , OPTIONAL, STATIC , OTHER, FRIMonitoringMessage, connectionInfo, monitorData, &ConnectionInfo_fields), | ||
PB_FIELD2( 5, MESSAGE , OPTIONAL, STATIC , OTHER, FRIMonitoringMessage, ipoData, connectionInfo, &MessageIpoData_fields), | ||
PB_FIELD2( 6, MESSAGE , REPEATED, STATIC , OTHER, FRIMonitoringMessage, requestedTransformations, ipoData, &QuaternionTransformation_fields), | ||
PB_FIELD2( 15, MESSAGE , OPTIONAL, STATIC , OTHER, FRIMonitoringMessage, endOfMessageData, requestedTransformations, &MessageEndOf_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t FRICommandMessage_fields[4] = { | ||
PB_FIELD2( 1, MESSAGE , REQUIRED, STATIC , FIRST, FRICommandMessage, header, header, &MessageHeader_fields), | ||
PB_FIELD2( 2, MESSAGE , OPTIONAL, STATIC , OTHER, FRICommandMessage, commandData, header, &MessageCommandData_fields), | ||
PB_FIELD2( 15, MESSAGE , OPTIONAL, STATIC , OTHER, FRICommandMessage, endOfMessageData, commandData, &MessageEndOf_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. | ||
*/ | ||
STATIC_ASSERT((pb_membersize(QuaternionTransformation, timestamp) < 65536 && pb_membersize(MessageMonitorData, measuredJointPosition) < 65536 && pb_membersize(MessageMonitorData, measuredTorque) < 65536 && pb_membersize(MessageMonitorData, commandedTorque) < 65536 && pb_membersize(MessageMonitorData, externalTorque) < 65536 && pb_membersize(MessageMonitorData, readIORequest[0]) < 65536 && pb_membersize(MessageMonitorData, measuredCartesianPose) < 65536 && pb_membersize(MessageMonitorData, measuredRedundancyInformation) < 65536 && pb_membersize(MessageMonitorData, timestamp) < 65536 && pb_membersize(MessageIpoData, jointPosition) < 65536 && pb_membersize(MessageIpoData, cartesianPose) < 65536 && pb_membersize(MessageIpoData, redundancyInformation) < 65536 && pb_membersize(MessageCommandData, jointPosition) < 65536 && pb_membersize(MessageCommandData, cartesianWrenchFeedForward) < 65536 && pb_membersize(MessageCommandData, jointTorque) < 65536 && pb_membersize(MessageCommandData, commandedTransformations[0]) < 65536 && pb_membersize(MessageCommandData, writeIORequest[0]) < 65536 && pb_membersize(MessageCommandData, cartesianPose) < 65536 && pb_membersize(MessageCommandData, redundancyInformation) < 65536 && pb_membersize(MessageEndOf, messageChecksum) < 65536 && pb_membersize(FRIMonitoringMessage, header) < 65536 && pb_membersize(FRIMonitoringMessage, connectionInfo) < 65536 && pb_membersize(FRIMonitoringMessage, robotInfo) < 65536 && pb_membersize(FRIMonitoringMessage, monitorData) < 65536 && pb_membersize(FRIMonitoringMessage, ipoData) < 65536 && pb_membersize(FRIMonitoringMessage, requestedTransformations[0]) < 65536 && pb_membersize(FRIMonitoringMessage, endOfMessageData) < 65536 && pb_membersize(FRICommandMessage, header) < 65536 && pb_membersize(FRICommandMessage, commandData) < 65536 && pb_membersize(FRICommandMessage, endOfMessageData) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_JointValues_TimeStamp_CartesianVector_Checksum_QuaternionTransformation_FriIOValue_RedundancyInformation_MessageHeader_ConnectionInfo_RobotInfo_MessageMonitorData_MessageIpoData_MessageCommandData_MessageEndOf_FRIMonitoringMessage_FRICommandMessage) | ||
#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(QuaternionTransformation, timestamp) < 256 && pb_membersize(MessageMonitorData, measuredJointPosition) < 256 && pb_membersize(MessageMonitorData, measuredTorque) < 256 && pb_membersize(MessageMonitorData, commandedTorque) < 256 && pb_membersize(MessageMonitorData, externalTorque) < 256 && pb_membersize(MessageMonitorData, readIORequest[0]) < 256 && pb_membersize(MessageMonitorData, measuredCartesianPose) < 256 && pb_membersize(MessageMonitorData, measuredRedundancyInformation) < 256 && pb_membersize(MessageMonitorData, timestamp) < 256 && pb_membersize(MessageIpoData, jointPosition) < 256 && pb_membersize(MessageIpoData, cartesianPose) < 256 && pb_membersize(MessageIpoData, redundancyInformation) < 256 && pb_membersize(MessageCommandData, jointPosition) < 256 && pb_membersize(MessageCommandData, cartesianWrenchFeedForward) < 256 && pb_membersize(MessageCommandData, jointTorque) < 256 && pb_membersize(MessageCommandData, commandedTransformations[0]) < 256 && pb_membersize(MessageCommandData, writeIORequest[0]) < 256 && pb_membersize(MessageCommandData, cartesianPose) < 256 && pb_membersize(MessageCommandData, redundancyInformation) < 256 && pb_membersize(MessageEndOf, messageChecksum) < 256 && pb_membersize(FRIMonitoringMessage, header) < 256 && pb_membersize(FRIMonitoringMessage, connectionInfo) < 256 && pb_membersize(FRIMonitoringMessage, robotInfo) < 256 && pb_membersize(FRIMonitoringMessage, monitorData) < 256 && pb_membersize(FRIMonitoringMessage, ipoData) < 256 && pb_membersize(FRIMonitoringMessage, requestedTransformations[0]) < 256 && pb_membersize(FRIMonitoringMessage, endOfMessageData) < 256 && pb_membersize(FRICommandMessage, header) < 256 && pb_membersize(FRICommandMessage, commandData) < 256 && pb_membersize(FRICommandMessage, endOfMessageData) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_JointValues_TimeStamp_CartesianVector_Checksum_QuaternionTransformation_FriIOValue_RedundancyInformation_MessageHeader_ConnectionInfo_RobotInfo_MessageMonitorData_MessageIpoData_MessageCommandData_MessageEndOf_FRIMonitoringMessage_FRICommandMessage) | ||
#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) | ||
|
||
/* Automatically generated nanopb constant definitions */ | ||
/* Generated by nanopb-0.4.8 */ | ||
|
||
#include "FRIMessages.pb.h" | ||
#if PB_PROTO_HEADER_VERSION != 40 | ||
#error Regenerate this file with the current version of nanopb generator. | ||
#endif | ||
|
||
PB_BIND(JointValues, JointValues, AUTO) | ||
|
||
|
||
PB_BIND(TimeStamp, TimeStamp, AUTO) | ||
|
||
|
||
PB_BIND(CartesianVector, CartesianVector, AUTO) | ||
|
||
|
||
PB_BIND(Checksum, Checksum, AUTO) | ||
|
||
|
||
PB_BIND(QuaternionTransformation, QuaternionTransformation, AUTO) | ||
|
||
|
||
PB_BIND(FriIOValue, FriIOValue, AUTO) | ||
|
||
|
||
PB_BIND(RedundancyInformation, RedundancyInformation, AUTO) | ||
|
||
|
||
PB_BIND(MessageHeader, MessageHeader, AUTO) | ||
|
||
|
||
PB_BIND(ConnectionInfo, ConnectionInfo, AUTO) | ||
|
||
|
||
PB_BIND(RobotInfo, RobotInfo, AUTO) | ||
|
||
|
||
PB_BIND(MessageMonitorData, MessageMonitorData, 2) | ||
|
||
|
||
PB_BIND(MessageIpoData, MessageIpoData, AUTO) | ||
|
||
|
||
PB_BIND(MessageCommandData, MessageCommandData, 2) | ||
|
||
|
||
PB_BIND(MessageEndOf, MessageEndOf, AUTO) | ||
|
||
|
||
PB_BIND(FRIMonitoringMessage, FRIMonitoringMessage, 2) | ||
|
||
|
||
PB_BIND(FRICommandMessage, FRICommandMessage, 2) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#ifndef PB_CONVERT_DOUBLE_FLOAT | ||
/* On some platforms (such as AVR), double is really float. | ||
* To be able to encode/decode double on these platforms, you need. | ||
* to define PB_CONVERT_DOUBLE_FLOAT in pb.h or compiler command line. | ||
*/ | ||
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) | ||
#endif | ||
|
Oops, something went wrong.