.. index:: pair: namespace; protobuf_ops .. _doxid-namespaceprotobuf__ops: namespace protobuf_ops ====================== .. toctree:: :hidden: class_protobuf_ops_NRPProtobufOps.rst class_protobuf_ops_NRPProtobufOpsIface.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace protobuf_ops { // classes template class :ref:`NRPProtobufOps`; class :ref:`NRPProtobufOpsIface`; // global functions template std::unique_ptr :ref:`unpackProtoAnySubset`(const gpb::Any& from); template void :ref:`setDataPackMessageDataSubset`( const gpb::Message& from, EngineGrpc::DataPackMessage* to ); template :ref:`DataPackInterfaceConstSharedPtr` :ref:`getDataPackInterfaceFromMessageSubset`( const std::string& engineName, const EngineGrpc::DataPackMessage& from ); template void :ref:`setDataPackMessageFromInterfaceSubset`( const :ref:`DataPackInterface`& from, EngineGrpc::DataPackMessage* to ); template void :ref:`setTrajectoryMessageFromInterfaceSubset`( const :ref:`DataPackInterface`& from, NrpCore::TrajectoryMessage* to ); } // namespace protobuf_ops .. _details-namespaceprotobuf__ops: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; unpackProtoAnySubset .. _doxid-namespaceprotobuf__ops_1a7db64702e1f5a87d923350d5e37b2dde: .. ref-code-block:: cpp :class: doxyrest-title-code-block template std::unique_ptr unpackProtoAnySubset(const gpb::Any& from) Attempts to unpack an Any protobuf msg to any of the template parameter classes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - MSG_TYPE - template param containing the list of protobuf types that will be check in the conversion * - REMAINING_MSG_TYPES - * - from - Any protobuf msg .. rubric:: Returns: protobuf msg unpacked from 'from' .. index:: pair: function; setDataPackMessageDataSubset .. _doxid-namespaceprotobuf__ops_1ae2a42b44daaf54dcb2e950399c38173c: .. ref-code-block:: cpp :class: doxyrest-title-code-block template void setDataPackMessageDataSubset( const gpb::Message& from, EngineGrpc::DataPackMessage* to ) Set a protobuf datapack msg data field from a protobuf message. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - MSG_TYPE - template param containing the list of protobuf types that will be check in the conversion * - REMAINING_MSG_TYPES - * - from - Protobuf message * - to - Protobuf datapack message which data will be set .. index:: pair: function; getDataPackInterfaceFromMessageSubset .. _doxid-namespaceprotobuf__ops_1a6513736af4b8364ea6a93e33d82e4d3d: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`DataPackInterfaceConstSharedPtr` getDataPackInterfaceFromMessageSubset( const std::string& engineName, const EngineGrpc::DataPackMessage& from ) Finds the type of protobuf msg contained in 'from' data field and creates a datapack from it. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - MSG_TYPE - template param containing the list of protobuf types that will be check in the conversion * - REMAINING_MSG_TYPES - * - engineName - owner of 'from' * - from - datapack protobuf msg .. rubric:: Returns: the instantiated datapack .. index:: pair: function; setDataPackMessageFromInterfaceSubset .. _doxid-namespaceprotobuf__ops_1ae862cee267e7331b66a4955d1c3c4d64: .. ref-code-block:: cpp :class: doxyrest-title-code-block template void setDataPackMessageFromInterfaceSubset( const :ref:`DataPackInterface`& from, EngineGrpc::DataPackMessage* to ) Sets the data field of a datapack protobuf message from a datapack interface. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - MSG_TYPE - template param containing the list of protobuf types that will be check in the conversion * - REMAINING_MSG_TYPES - * - from - input datapack containing data * - to - protobuf msg pointer which data field will be set to 'from' .. index:: pair: function; setTrajectoryMessageFromInterfaceSubset .. _doxid-namespaceprotobuf__ops_1aa92886b42b591183022ef50af1d748a3: .. ref-code-block:: cpp :class: doxyrest-title-code-block template void setTrajectoryMessageFromInterfaceSubset( const :ref:`DataPackInterface`& from, NrpCore::TrajectoryMessage* to ) Sets the data field of a datapack protobuf message from a datapack interface. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - MSG_TYPE - template param containing the list of protobuf types that will be check in the conversion * - REMAINING_MSG_TYPES - * - from - input datapack containing data * - to - protobuf msg pointer which data field will be set to 'from'