Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90824233
OncillaSynchronizer.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 5, 02:49
Size
2 KB
Mime Type
text/x-c++
Expires
Thu, Nov 7, 02:49 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22138970
Attached To
R6622 liboncilla
OncillaSynchronizer.h
View Options
#pragma once
#include <vector>
#include <iostream>
#include <boost/shared_ptr.hpp>
#include <rci/Synchronizer.h>
#include "Oncilla.h"
namespace rci {
namespace oncilla {
class OncillaSynchronizer;
typedef std::tr1::shared_ptr<OncillaSynchronizer> OncillaSynchronizerPtr;
class OncillaTrunk;
typedef std::tr1::shared_ptr<OncillaTrunk> OncillaTrunkPtr;
class OncillaL0;
typedef std::tr1::shared_ptr<OncillaL0> OncillaL0Ptr;
class OncillaL1L2;
typedef std::tr1::shared_ptr<OncillaL1L2> OncillaL1Ptr;
typedef std::tr1::shared_ptr<OncillaL1L2> OncillaL2Ptr;
class OncillaL3;
typedef std::tr1::shared_ptr<OncillaL3> OncillaL3Ptr;
class OncillaL4;
typedef std::tr1::shared_ptr<OncillaL4> OncillaL4Ptr;
/**
* OncillaSynchronizer
* Different OncillaSynchronizers may be for example:
* * Update with a given frequency
* ** Send data every time
* ** Send only if new data
* * Update only if new data (event-based)
* * Triggered from robot side (e.g. FRI)
*/
class OncillaSynchronizer: public Synchronizer {
public:
enum Synchronization {
INTERNAL,
EXTERNAL
};
OncillaSynchronizer(const std::string &name);
virtual ~OncillaSynchronizer();
/**
* Registers a trunk node.
*/
virtual void registerTrunkNode(OncillaTrunkPtr node) = 0;
/**
* Registers an L0 node.
*/
virtual void registerL0Node(Oncilla::Leg l, OncillaL0Ptr node) = 0;
/**
* Registers an L1 node.
*/
virtual void registerL1Node(Oncilla::Leg l, OncillaL1Ptr node) = 0;
/**
* Registers an L2 node.
*/
virtual void registerL2Node(Oncilla::Leg l, OncillaL2Ptr node) = 0;
/**
* Registers an L3 node.
*/
virtual void registerL3Node(Oncilla::Leg l, OncillaL3Ptr node) = 0;
/**
* Registers an L4 node.
*/
virtual void registerL4Node(Oncilla::Leg l, OncillaL4Ptr node) = 0;
/**
*
*/
friend std::ostream
& operator<<(std::ostream& os, const OncillaSynchronizer& val);
double latestProcessLoopDuration() const;
Synchronization synchronizationMode() const;
void setSynchronizationMode(Synchronization s);
protected :
virtual double latestProcessLoopDurationPrimpl() const = 0;
virtual void switchToSynchronizationModeHook() = 0;
Synchronization d_mode;
};
}
}
Event Timeline
Log In to Comment