Changeset 206 in pacpusframework for trunk/src/PacpusLib/InputOutputBase.cpp
- Timestamp:
- Oct 30, 2013, 12:26:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PacpusLib/InputOutputBase.cpp
r200 r206 5 5 #include <Pacpus/kernel/InputOutputInterface.h> 6 6 #include <Pacpus/kernel/Log.h> 7 8 #include <QApplication>9 7 10 8 using namespace pacpus; … … 124 122 } 125 123 126 // TODO for serialization prupose (not yet implemented !!!) 127 void OutputInterfaceBase::send(/*const*/ QByteArray & data) 128 { 129 // TODO check at least one Typed connection 130 131 for (QList<ConnectionBase>::iterator it = connections().begin(); it!=connections().end(); ++it) { 132 QDataStream in(&data,QIODevice::ReadOnly); 133 PacpusEvent * event = dynamic_cast<InputInterfaceBase*>(connections().at(0).getInterface())->getEventTemplate(); 134 event->streamIn(in); 135 QApplication::postEvent(it->getInterface(),event,it->getPriority()); 136 } 137 } 124 // TODO for serialization purpose (not yet implemented !!!) 125 //void OutputInterfaceBase::send(/*const*/ QByteArray & data) 126 //{ 127 // // TODO check at least one Typed connection 128 // 129 // for (QList<ConnectionBase>::iterator it = connections().begin(), itend = connections().end(); it != itend; ++it) { 130 // QDataStream in(&data, QIODevice::ReadOnly); 131 // InputInterfaceBase * interfaceBase 132 // = dynamic_cast<InputInterfaceBase *>(connections().at(0).getInterface()); 133 // //AbstractInterface * interfaceBase = connections().at(0).getInterface(); 134 // if (!interfaceBase) { 135 // continue; 136 // } 137 // PacpusEvent * event = interfaceBase->getEventTemplate(); 138 // if (!event) { 139 // continue; 140 // } 141 // event->streamIn(in); 142 // QCoreApplication::postEvent( 143 // it->getInterface(), 144 // event, 145 // it->getPriority() 146 // ); 147 // } 148 //}
Note:
See TracChangeset
for help on using the changeset viewer.