#include <VoltVarCtrl.hpp>
class VVCAgent
- Description:
- Declaration
freedm::broker::vvc::VVCAgent::VVCAgent |
( |
| ) |
|
VVCAgent
- Description:
- : Constructor for the VVC module
- Precondition:
- : Posix Main should register read handler and invoke this module
- Postcondition:
- : Object is initialized and ready to run
- Parameters
-
uuid_ | This object's uuid |
broker | The Broker |
- Limitations:
- : None
freedm::broker::vvc::VVCAgent::~VVCAgent |
( |
| ) |
|
void freedm::broker::vvc::VVCAgent::FirstRound |
( |
const boost::system::error_code & |
err | ) |
|
|
private |
FirstRound
- Description:
- The code that is executed as part of the first VVC each round.
- Precondition:
- None
- Postcondition:
- if the timer wasn't cancelled this function calls the first VVC.
- Parameters
-
error | The reason this function was called. |
GetMe
- Description:
- Gets a CPeerNode that refers to this process.
- Returns
- A CPeerNode referring to this process.
std::string IDGIModule::GetUUID |
( |
| ) |
const |
|
protectedinherited |
GetUUID
- Description:
- Gets this process's UUID.
- Returns
- This process's UUID
ModuleMessage freedm::broker::vvc::VVCAgent::Gradient |
( |
arma::mat |
grad | ) |
|
|
private |
void freedm::broker::vvc::VVCAgent::HandleGradient |
( |
const GradientMessage & |
m, |
|
|
CPeerNode |
peer |
|
) |
| |
|
private |
void freedm::broker::vvc::VVCAgent::HandleIncomingMessage |
( |
boost::shared_ptr< const ModuleMessage > |
m, |
|
|
CPeerNode |
peer |
|
) |
| |
|
privatevirtual |
HandleIncomingMessage "Downcasts" incoming messages into a specific message type, and passes the message to an appropriate handler.
- Precondition:
- None
- Postcondition:
- The message is handled by the target handler or a warning is produced.
- Parameters
-
m | the incoming message |
peer | the node that sent this message (could be this DGI) |
Implements freedm::broker::IDGIModule.
void freedm::broker::vvc::VVCAgent::HandleLineReadings |
( |
const LineReadingsMessage & |
m, |
|
|
CPeerNode |
peer |
|
) |
| |
|
private |
void freedm::broker::vvc::VVCAgent::HandlePeerList |
( |
const gm::PeerListMessage & |
m, |
|
|
CPeerNode |
peer |
|
) |
| |
|
private |
void freedm::broker::vvc::VVCAgent::HandleVoltageDelta |
( |
const VoltageDeltaMessage & |
m, |
|
|
CPeerNode |
peer |
|
) |
| |
|
private |
ModuleMessage freedm::broker::vvc::VVCAgent::LineReadings |
( |
std::vector< float > |
vals | ) |
|
|
private |
ModuleMessage freedm::broker::vvc::VVCAgent::PrepareForSending |
( |
const VoltVarMessage & |
message, |
|
|
std::string |
recipient |
|
) |
| |
|
private |
void freedm::broker::vvc::VVCAgent::ReadDevices |
( |
| ) |
|
|
private |
ReadDevices
- Description:
- Reads the device state and updates the appropriate member vars.
- Precondition:
- None
- Postcondition:
int freedm::broker::vvc::VVCAgent::Run |
( |
| ) |
|
Run
- Description:
- Main function which initiates the algorithm
- Precondition:
- : Posix Main should invoke this function
- Postcondition:
- : Triggers the vvc algorithm by calling VVCManage()
- Limitations:
- None
void freedm::broker::vvc::VVCAgent::ScheduleNextRound |
( |
| ) |
|
|
private |
ScheduleNextRound
- Description:
- Computes how much time is remaining and if there isn't enough requests the VVC that will run next round.
- Precondition:
- None
- Postcondition:
- VVCManage is scheduled for this round OR FirstRound is scheduled for next time.
ModuleMessage freedm::broker::vvc::VVCAgent::VoltageDelta |
( |
unsigned int |
cf, |
|
|
float |
pm, |
|
|
std::string |
loc |
|
) |
| |
|
private |
void freedm::broker::vvc::VVCAgent::vvc_main |
( |
| ) |
|
|
private |
void freedm::broker::vvc::VVCAgent::vvc_Manage |
( |
const boost::system::error_code & |
err | ) |
|
|
private |
void freedm::broker::vvc::VVCAgent::VVCManage |
( |
const boost::system::error_code & |
err | ) |
|
|
private |
VVCManage
- Description:
- : Manages the execution of the VVC algorithm
- Precondition:
- :
- Postcondition:
- :
- Interaction Peers:
- Limitations:
float freedm::broker::vvc::VVCAgent::m_Gateway |
|
private |
std::string freedm::broker::vvc::VVCAgent::m_leader |
|
private |
std::string freedm::broker::vvc::VVCAgent::m_Leader |
|
private |
float freedm::broker::vvc::VVCAgent::m_MigrationStep |
|
private |
float freedm::broker::vvc::VVCAgent::m_NetGeneration |
|
private |
PeerSet freedm::broker::vvc::VVCAgent::m_peers |
|
private |
float freedm::broker::vvc::VVCAgent::m_PowerDifferential |
|
private |
float freedm::broker::vvc::VVCAgent::m_PredictedGateway |
|
private |
bool freedm::broker::vvc::VVCAgent::m_Synchronized |
|
private |
const boost::posix_time::time_duration freedm::broker::vvc::VVCAgent::REQUEST_TIMEOUT |
|
private |
const boost::posix_time::time_duration freedm::broker::vvc::VVCAgent::ROUND_TIME |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/freedm/checkouts/latest/Broker/src/vvc/VoltVarCtrl.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/freedm/checkouts/latest/Broker/src/vvc/VoltVarCtrl.cpp