Feature #1741

Feature #44: Implement basic introspection support

Implement introspection event sender

Added by J. Moringen over 7 years ago. Updated about 7 years ago.

Status:ResolvedStart date:03/24/2014
Priority:NormalDue date:03/24/2014
Assignee:J. Moringen% Done:

100%

Category:C++
Target version:rsb-0.11

Description

  • Basic participant information
  • Echo server for clock measurements

Related issues

Related to Robotics Service Bus - Tasks #1822: Add method classes Resolved 03/24/2014

Associated revisions

Revision c3febae1
Added by J. Moringen over 7 years ago

[Remote]Server derived from Participant in src/rsb/patterns/RemoteServer.{h,cpp}

refs #1741

  • src/rsb/patterns/RemoteServer.{h,cpp} (header): updated copyright
    (RemoteServer): changed base class to Participant
    (RemoteServer::scope): removed; stored in base class
    (RemoteServer::RemoteServer): pass scope and configuration to base
    class constructor
    (RemoteServer::getMethodSet): adapted to above changes
  • src/rsb/patterns/Server.{h,cpp} (header): updated copyright
    (Server): changed base class to Participant
    (Server::scope): removed; stored in base class
    (Server::Server): pass scope and configuration to base class
    constructor
    (Server::registerMethod): adapted to above changes

Revision f30e3178
Added by J. Moringen about 7 years ago

Added Participant::getKind in src/rsb/Participant.h

refs #1741

  • src/rsb/Participant.h (Participant::getKind): new method; return a
    string describing the kind of the participant
  • src/rsb/Listener.{h,cpp} (Listener::getKind): new method; implement
    extended Participant interface
  • src/rsb/Reader.{h,cpp} (Reader::getKind): likewise
  • src/rsb/Informer.{h,cpp} (Informer::getKind): likewise
  • src/rsb/patterns/RemoteServer.{h,cpp} (RemoteServer::getKind):
    likewise
    (RemoteServer::RemoteMethod::getKind): likewise
  • src/rsb/patterns/LocalServer.{h,cpp} (LocalServer::getKind): likewise
    (LocalServer::LocalMethod::getKind): likewise

Revision 55e9bdda
Added by J. Moringen about 7 years ago

Configuration options for introspection in src/rsb/ParticipantConfig.{h,cpp}

refs #1741

  • src/rsb/ParticipantConfig.{h,cpp} (ParticipantConfig::introspection):
    new member variable; flag for controlling publishing of introspection
    messages
    (ParticipantConfig::getIntrospection): new member function; getter
    (ParticipantConfig::setIntrospection): new member function; setter
    (ParticipantConfig::handleOption): parse "introspection" section with
    "enabled" option

Revision 6543c7f5
Added by J. Moringen about 7 years ago

Added introspection plugin skeleton in src/rsb/introspection/*

refs #1741

  • src/rsb/introspection/IntrospectionSender.{h,cpp}: new file; contains
    class IntrospectionSender which send introspection messages and
    processes introspection queries
  • src/rsb/introspection/Plugin.cpp: new file; contains plugin init
    function for registering converters and hooking into participant
    creation and destruction
  • src/rsb/introspection/CMakeLists.txt: new file; build and install
    introspection plugin
  • src/CMakeLists.txt: added subdirectory src/rsb/introspection

Revision 12c6186e
Added by J. Moringen about 7 years ago

Added model classes in src/rsb/introspection/Model.{h,cpp}

refs #1741

  • src/rsb/introspection/Model.{h,cpp}: new files; contain the model
    classes ParticipantInfo, ProcessInfo and HostInfo
  • src/rsb/introspection/IntrospectionSender.{h,cpp}
    (IntrospectionSender::process): new member variable; stores the
    process information for the process
    (IntrospectionSender::host): new member variable; stores the host
    information for the local host
  • src/rsb/introspection/CMakeLists.txt: added files
    src/rsb/introspection/Model.{h,cpp}

Revision e9434de8
Added by J. Moringen about 7 years ago

Added query handler in src/rsb/introspection/IntrospectionSender.{h,cpp}

refs #1741

New QueryHandler struct replies to introspection queries.

  • src/rsb/introspection/IntrospectionSender.{h,cpp} (QueryHandler): new
    struct; reply to introspection queries; keeps reference to
    IntrospectionSender
    (IntrospectionSender::IntrospectionSender): connect QueryHandler
    instance to listener

Revision 710152d2
Added by J. Moringen about 7 years ago

Added introspection server in src/rsb/introspection/IntrospectionSender.{h,cpp}

refs #1741

IntrospectionSender now contains a LocalServer that provides
information about the process via RPC.

  • src/rsb/introspection/IntrospectionSender.{h,cpp} (EchoCallback): new
    class; sends replies augmented with timing information
    (IntrospectionSender::server): new member variable; stores a server
    exposing the EchoCallback instance
    (IntrospectionSender::IntrospectionSender): construct a LocalServer
    that provides information about the process via RPC

Revision bc75d697
Added by J. Moringen about 7 years ago

Methods send{Hello,Bye} in src/rsb/introspection/IntrospectionSender.{h,cpp}

fixes #1741

  • src/rsb/introspection/IntrospectionSender.{h,cpp}
    (IntrospectionSender::sendHello): new method; send
    rsb.protocol.introspection.Hello message when a participant is created
    or the information is requested
    (IntrospectionSender::sendBye): new method; send
    rsb.protocol.introspection.Bye message when a participant is destroyed

Revision c6965422
Added by J. Moringen about 7 years ago

Added Participant::getKind in src/rsb/Participant.h

refs #1741

  • src/rsb/Participant.h (Participant::getKind): new method; return a
    string describing the kind of the participant
  • src/rsb/Listener.{h,cpp} (Listener::getKind): new method; implement
    extended Participant interface
  • src/rsb/Reader.{h,cpp} (Reader::getKind): likewise
  • src/rsb/Informer.{h,cpp} (Informer::getKind): likewise
  • src/rsb/patterns/RemoteServer.{h,cpp} (RemoteServer::getKind):
    likewise
    (RemoteServer::RemoteMethod::getKind): likewise
  • src/rsb/patterns/LocalServer.{h,cpp} (LocalServer::getKind): likewise
    (LocalServer::LocalMethod::getKind): likewise

Reviewed-by: Johannes Wienke <>

Revision fd8a57fe
Added by J. Moringen about 7 years ago

Configuration options for introspection in src/rsb/ParticipantConfig.{h,cpp}

refs #1741

  • src/rsb/ParticipantConfig.{h,cpp} (ParticipantConfig::introspection):
    new member variable; flag for controlling publishing of introspection
    messages
    (ParticipantConfig::isIntrospectionEnabled): new member function;
    getter
    (ParticipantConfig::setIsIntrospectionEnabled): new member function;
    setter
    (ParticipantConfig::handleOption): parse "introspection" section with
    "enabled" option

Reviewed-by: Johannes Wienke <>

Revision 61d4cace
Added by J. Moringen about 7 years ago

Added introspection plugin skeleton in src/rsb/introspection/*

refs #1741

  • src/rsb/introspection/Types.{h,cpp}: new files; contain basic
    constants
  • src/rsb/introspection/IntrospectionSender.{h,cpp}: new files; contain
    class IntrospectionSender which send introspection messages and
    processes introspection queries
  • src/rsb/introspection/Plugin.cpp: new file; contains plugin init
    function for registering converters and hooking into participant
    creation and destruction
  • src/rsb/introspection/CMakeLists.txt: new file; build and install
    introspection plugin
  • src/CMakeLists.txt: added subdirectory src/rsb/introspection

Reviewed-by: Johannes Wienke <>

Revision de35ca6c
Added by J. Moringen about 7 years ago

Added model classes in src/rsb/introspection/Model.{h,cpp}

refs #1741

  • src/rsb/introspection/Model.{h,cpp}: new files; contain the model
    classes ParticipantInfo, ProcessInfo and HostInfo
  • src/rsb/introspection/IntrospectionSender.{h,cpp}
    (IntrospectionSender::process): new member variable; stores the
    process information for the process
    (IntrospectionSender::host): new member variable; stores the host
    information for the local host
  • src/rsb/introspection/CMakeLists.txt: added files
    src/rsb/introspection/Model.{h,cpp}

Reviewed-by: Johannes Wienke <>

Revision 93761816
Added by J. Moringen about 7 years ago

Added query handler in src/rsb/introspection/IntrospectionSender.{h,cpp}

refs #1741

New QueryHandler struct replies to introspection queries.

Also, lock IntrospectionSender object in all entry point methods.

  • src/rsb/introspection/IntrospectionSender.{h,cpp} (QueryHandler): new
    struct; reply to introspection queries; keeps reference to
    IntrospectionSender
    (IntrospectionSender::mutex): new member variable; protects concurrent
    accesses to the sender object
    (IntrospectionSender::IntrospectionSender): connect QueryHandler
    instance to listener
    (IntrospectionSender::addParticipant): lock mutex
    (IntrospectionSender::removeParticipant): likewise

Reviewed-by: Johannes Wienke <>

Revision af057134
Added by J. Moringen about 7 years ago

Added introspection server in src/rsb/introspection/IntrospectionSender.{h,cpp}

refs #1741

IntrospectionSender now contains a LocalServer that provides
information about the process via RPC.

  • src/rsb/introspection/IntrospectionSender.{h,cpp} (EchoCallback): new
    class; sends replies augmented with timing information
    (IntrospectionSender::server): new member variable; stores a server
    exposing the EchoCallback instance
    (IntrospectionSender::IntrospectionSender): construct a LocalServer
    that provides information about the process via RPC

Reviewed-by: Johannes Wienke <>

Revision 0a2f09be
Added by J. Moringen about 7 years ago

Methods send{Hello,Bye} in src/rsb/introspection/IntrospectionSender.{h,cpp}

fixes #1741

  • src/rsb/introspection/IntrospectionSender.{h,cpp}
    (IntrospectionSender::sendHello): new method; send
    rsb.protocol.introspection.Hello message when a participant is created
    or the information is requested
    (IntrospectionSender::sendBye): new method; send
    rsb.protocol.introspection.Bye message when a participant is destroyed

Reviewed-by: Johannes Wienke <>

History

#1 Updated by J. Moringen over 7 years ago

  • Description updated (diff)

#2 Updated by J. Moringen over 7 years ago

  • % Done changed from 20 to 60

#3 Updated by J. Moringen over 7 years ago

  • Assignee set to J. Moringen

#4 Updated by J. Moringen over 7 years ago

  • % Done changed from 60 to 80

#5 Updated by J. Moringen over 7 years ago

  • % Done changed from 80 to 90

#6 Updated by J. Moringen about 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

#7 Updated by J. Moringen about 7 years ago

  • Category changed from C++ to Introspection

#8 Updated by J. Moringen about 7 years ago

  • Category changed from Introspection to C++

Also available in: Atom PDF