Changeset 94:20a1183cbd09 in finroc_plugins_runtime_construction


Ignore:
Timestamp:
06.06.2017 21:13:51 (2 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds GetRegisterUpdates function to AdministrationService

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tAdministrationService.cpp

    r91 r94  
    8282    &tAdministrationService::SaveFinstructableGroup, &tAdministrationService::SetAnnotation, &tAdministrationService::SetPortValue, 
    8383    &tAdministrationService::StartExecution, &tAdministrationService::NetworkConnect, &tAdministrationService::ConnectPorts,  // NetworkConnect etc. are last in order to not break binary compatibility 
    84     &tAdministrationService::CreateUriConnector, &tAdministrationService::DeleteUriConnector); 
     84    &tAdministrationService::CreateUriConnector, &tAdministrationService::DeleteUriConnector, &tAdministrationService::GetRegisterUpdates); 
    8585 
    8686static tAdministrationService administration_service; 
     
    454454} 
    455455 
     456rrlib::serialization::tRegisterUpdate tAdministrationService::GetRegisterUpdates(int register_uid) 
     457{ 
     458  if (register_uid < 0 || register_uid >= rrlib::serialization::cMAX_PUBLISHED_REGISTERS) 
     459  { 
     460    throw std::runtime_error("Invalid register uid"); 
     461  } 
     462  return rrlib::serialization::tRegisterUpdate(register_uid); 
     463} 
     464 
    456465tAdministrationService::tExecutionStatus tAdministrationService::IsExecuting(int element_handle) 
    457466{ 
     
    596605    { 
    597606      core::tAnnotation* annotation = element->GetAnnotation(type.GetRttiName()); 
    598       if (annotation == NULL) 
     607      if (!annotation) 
    599608      { 
    600609        FINROC_LOG_PRINT(ERROR, "Creating new annotations not supported yet. Canceling setting of annotation."); 
  • tAdministrationService.h

    r91 r94  
    4444// External includes (system with <>, local with "") 
    4545//---------------------------------------------------------------------- 
     46#include "rrlib/serialization/tRegisterUpdate.h" 
    4647#include "plugins/rpc_ports/tServerPort.h" 
    4748 
     
    99100 
    100101  /*! 
     102   * (superseded by ConnectPorts) 
    101103   * Connect source port to destination port 
    102104   * 
     
    184186 
    185187  /*! 
     188   * (superseded by GetRegisterUpdates) 
     189   * 
    186190   * \return All actions for creating framework element currently registered in this runtime environment - serialized 
    187191   */ 
     
    200204 
    201205  /*! 
     206   * Gets all updates on specified register and all registers to be updated on change. 
     207   * After calling this method, the client's data on these remote registers is up to date. 
     208   * 
     209   * \param register_uid Uid of register to obtain updates for 
     210   * \return Updates (object does not need to be processed - does its work during deserialization) 
     211   */ 
     212  rrlib::serialization::tRegisterUpdate GetRegisterUpdates(int register_uid); 
     213 
     214  /*! 
    202215   * \param element_handle Handle of framework element 
    203216   * \return Is specified framework element currently executing? 
     
    209222   * 
    210223   * \param library_name File name of library to load 
    211    * \return Available module libraries (.so files) that have not been loaded yet - serialized (Updated version) 
     224   * \return Empty memory buffer (used to be buffer with all actions for creating framework element currently registered in this runtime environment - serialized) 
    212225   */ 
    213226  rrlib::serialization::tMemoryBuffer LoadModuleLibrary(const std::string& library_name); 
    214227 
    215228  /*! 
     229   * (superseded by CreateUriConnector) 
     230   * 
    216231   * Connect local port to port in remote runtime environment using one of the 
    217232   * available network transport plugins. 
Note: See TracChangeset for help on using the changeset viewer.