implements reinit of IO channels
This commit is contained in:
parent
04a5c37a55
commit
2992e1b100
3 changed files with 12 additions and 0 deletions
|
@ -383,6 +383,12 @@ FGProtocol* FGIO::add_channel(const string& config)
|
|||
void
|
||||
FGIO::reinit()
|
||||
{
|
||||
SG_LOG(SG_IO, SG_INFO, "FGIO::reinit()");
|
||||
|
||||
std::for_each(io_channels.begin(), io_channels.end(), [](FGProtocol* p) {
|
||||
SG_LOG(SG_IO, SG_INFO, "Restarting channel \"" << p->get_name() << "\"");
|
||||
p->reinit();
|
||||
});
|
||||
}
|
||||
|
||||
// process any IO channel work
|
||||
|
|
|
@ -81,6 +81,11 @@ bool FGProtocol::close() {
|
|||
return false;
|
||||
}
|
||||
|
||||
// dummy reinit routine
|
||||
void FGProtocol::reinit()
|
||||
{
|
||||
SG_LOG(SG_IO, SG_INFO, "dummy FGProtocol::reinit()");
|
||||
}
|
||||
|
||||
// standard I/O channel close routine
|
||||
bool FGProtocol::gen_message() {
|
||||
|
|
|
@ -65,6 +65,7 @@ public:
|
|||
virtual bool open();
|
||||
virtual bool process();
|
||||
virtual bool close();
|
||||
virtual void reinit();
|
||||
|
||||
inline SGProtocolDir get_direction() const { return dir; }
|
||||
void set_direction( const string& d );
|
||||
|
|
Loading…
Add table
Reference in a new issue