Changeset 98:c912a6633f75 in finroc_plugins_blackboard


Ignore:
Timestamp:
17.07.2013 16:04:21 (6 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Adapted to changes in finroc_plugins_structure regarding tSenseControlGroup

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • internal/tBlackboardBase.cpp

    r95 r98  
    7777{} 
    7878 
    79 tBlackboardBase::tBlackboardBase(const tBlackboardBase& replicated_bb, structure::tGroup* parent, bool create_read_port_in_co, bool forward_write_port_in_controller, bool forward_write_port_in_sensor) : 
     79tBlackboardBase::tBlackboardBase(const tBlackboardBase& replicated_bb, structure::tSenseControlGroup* parent, bool create_read_port_in_co, bool forward_write_port_in_controller, bool forward_write_port_in_sensor) : 
    8080  write_port1(NULL), 
    8181  write_port2(NULL) 
  • internal/tBlackboardBase.h

    r86 r98  
    4343#include "plugins/structure/tGroup.h" 
    4444#include "plugins/structure/tModule.h" 
     45#include "plugins/structure/tSenseControlGroup.h" 
    4546#include "plugins/structure/tSenseControlModule.h" 
    4647 
     
    8889 
    8990  /*! 
    90    * Constructor to replicate access to inner tBlackboard in tGroup. 
     91   * Constructor to replicate access to inner tBlackboard in tSenseControlGroup. 
    9192   * (per default, full-blackboard-access-ports are created in the same port groups as in the inner group/module. 
    9293   *  In case of a plain tModule, ports in tSensorOutput and tControllerInput are created by default.) 
     
    9899   * \param forward_write_port_in_sensor Forward write ports in sensor port groups? 
    99100   */ 
    100   tBlackboardBase(const tBlackboardBase& replicated_bb, structure::tGroup* parent, bool create_read_port_in_co = false, bool forward_write_port_in_controller = true, bool forward_write_port_in_sensor = false); 
     101  tBlackboardBase(const tBlackboardBase& replicated_bb, structure::tSenseControlGroup* parent, bool create_read_port_in_co = false, bool forward_write_port_in_controller = true, bool forward_write_port_in_sensor = false); 
    101102 
    102103  /*! move constructor */ 
     
    107108 
    108109  /*! Helper function to determine port group to create write ports in by default */ 
    109   static core::tPortGroup* GetWritePortGroup(structure::tGroup* g) 
     110  static core::tPortGroup* GetWritePortGroup(structure::tSenseControlGroup* g) 
    110111  { 
    111112    return &g->GetControllerInputs(); 
     
    115116  { 
    116117    return &g->GetControllerInputs(); 
     118  } 
     119 
     120  static core::tPortGroup* GetWritePortGroup(structure::tGroup* g) 
     121  { 
     122    return &g->GetInputs(); 
    117123  } 
    118124 
  • tBlackboard.h

    r86 r98  
    174174   * \param forward_write_port_in_sensor Forward write ports in sensor port groups? 
    175175   */ 
    176   tBlackboard(tBlackboard& replicated_bb, structure::tGroup* parent, bool create_read_port_in_co = false, 
     176  tBlackboard(tBlackboard& replicated_bb, structure::tSenseControlGroup* parent, bool create_read_port_in_co = false, 
    177177              bool forward_write_port_in_controller = true, bool forward_write_port_in_sensor = false) : 
    178178    tBlackboardBase(replicated_bb, parent, create_read_port_in_co, forward_write_port_in_controller, forward_write_port_in_sensor), 
     
    202202      if (create_read_port_in_co) 
    203203      { 
    204         read_port = structure::tGroup::tControllerOutput<std::vector<T>>(replicated_bb.read_port.GetName(), parent); 
     204        read_port = structure::tSenseControlGroup::tControllerOutput<std::vector<T>>(replicated_bb.read_port.GetName(), parent); 
    205205      } 
    206206      else 
    207207      { 
    208         read_port = structure::tGroup::tSensorOutput<std::vector<T>>(replicated_bb.read_port.GetName(), parent); 
     208        read_port = structure::tSenseControlGroup::tSensorOutput<std::vector<T>>(replicated_bb.read_port.GetName(), parent); 
    209209      } 
    210210      replicated_bb.read_port.ConnectTo(read_port); 
     
    315315    typedef typename std::conditional < std::is_base_of<structure::tModule, TParent>::value, structure::tModule::tOutput<tBuffer>, 
    316316            typename std::conditional < std::is_base_of<structure::tSenseControlModule, TParent>::value, structure::tSenseControlModule::tSensorOutput<tBuffer>, 
    317             typename std::conditional < std::is_base_of<structure::tGroup, TParent>::value, structure::tGroup::tSensorOutput<tBuffer>, 
     317            typename std::conditional < std::is_base_of<structure::tSenseControlGroup, TParent>::value, structure::tSenseControlGroup::tSensorOutput<tBuffer>, 
    318318            data_ports::tPort<tBuffer >>::type >::type >::type type; 
    319319  }; 
  • tBlackboardClient.h

    r92 r98  
    4545//---------------------------------------------------------------------- 
    4646#include "plugins/rpc_ports/tProxyPort.h" 
    47 #include "plugins/structure/tGroup.h" 
     47#include "plugins/structure/tSenseControlGroup.h" 
    4848#include "plugins/structure/tModule.h" 
    4949 
     
    161161 
    162162  /*! 
    163    * Constructor to replicate access to inner tBlackboardClient in tGroup. 
     163   * Constructor to replicate access to inner tBlackboardClient in tSenseControlGroup. 
    164164   * (per default, full-blackboard-access-ports are created in the same port groups as in the inner group/module. 
    165165   *  In case of a plain tModule, ports in tSensorOutput and tControllerInput are created by default.) 
     
    171171   * \param forward_write_port_in_sensor Forward write ports in sensor port groups? 
    172172   */ 
    173   tBlackboardClient(const tBlackboardClient& replicated_bb, structure::tGroup* parent, 
     173  tBlackboardClient(const tBlackboardClient& replicated_bb, structure::tSenseControlGroup* parent, 
    174174                    bool create_read_port_in_ci = false, bool forward_write_port_in_controller = true, bool forward_write_port_in_sensor = false); 
    175175 
  • tBlackboardClient.hpp

    r97 r98  
    130130 
    131131template<typename T> 
    132 tBlackboardClient<T>::tBlackboardClient(const tBlackboardClient& replicated_bb, structure::tGroup* parent, bool create_read_port_in_ci, bool forward_write_port_in_controller, bool forward_write_port_in_sensor) : 
     132tBlackboardClient<T>::tBlackboardClient(const tBlackboardClient& replicated_bb, structure::tSenseControlGroup* parent, bool create_read_port_in_ci, bool forward_write_port_in_controller, bool forward_write_port_in_sensor) : 
    133133  read_port(), 
    134134  write_port(), 
     
    155155    if (create_read_port_in_ci) 
    156156    { 
    157       outside_read_port = structure::tGroup::tControllerInput<tBuffer>(replicated_bb.GetOutsideReadPort().GetName(), parent); 
     157      outside_read_port = structure::tSenseControlGroup::tControllerInput<tBuffer>(replicated_bb.GetOutsideReadPort().GetName(), parent); 
    158158    } 
    159159    else 
    160160    { 
    161       outside_read_port = structure::tGroup::tSensorInput<tBuffer>(replicated_bb.GetOutsideReadPort().GetName(), parent); 
     161      outside_read_port = structure::tSenseControlGroup::tSensorInput<tBuffer>(replicated_bb.GetOutsideReadPort().GetName(), parent); 
    162162    } 
    163163    replicated_bb.GetOutsideReadPort().ConnectTo(outside_read_port); 
  • test/pBlackboardConnectionTest.cpp

    r91 r98  
    9090 
    9191/*! Group replicating Blackboard */ 
    92 class gBlackboardServer : public finroc::structure::tGroup 
     92class gBlackboardServer : public finroc::structure::tSenseControlGroup 
    9393{ 
    9494public: 
     
    9696 
    9797  gBlackboardServer(tFrameworkElement* parent) : 
    98     tGroup(parent, "BlackboardServerGroup", ""), 
     98    tSenseControlGroup(parent, "BlackboardServerGroup", ""), 
    9999    blackboard() 
    100100  { 
     
    112112 
    113113/*! Group replicating BlackboardClient */ 
    114 class gBlackboardClient : public finroc::structure::tGroup 
     114class gBlackboardClient : public finroc::structure::tSenseControlGroup 
    115115{ 
    116116public: 
     
    118118 
    119119  gBlackboardClient(tFrameworkElement* parent) : 
    120     tGroup(parent, "BlackboardClientGroup", ""), 
     120    tSenseControlGroup(parent, "BlackboardClientGroup", ""), 
    121121    bb_client() 
    122122  { 
Note: See TracChangeset for help on using the changeset viewer.