timecodeplugin-messagebus.cpp

Go to the documentation of this file.
00001 #include "timecodeplugin.h"
00002 
00003 /** Initialize BusID.
00004  **/
00005 bool TimeCodePlugin::loadBus(const int ID)
00006 {
00007     MyID = ID;
00008     QByteArray i;
00009     i.setNum(MyID);
00010     qDebug("     TimeCode Bus initialization - " + i);
00011     return true;
00012 }
00013     
00014 /** Returns the name of this bus.
00015  **/
00016 QString TimeCodePlugin::BusName()
00017 {
00018     return "TimeCode";
00019 }
00020 
00021 /** Receives bus data.
00022  **/
00023 void TimeCodePlugin::BitBus(const int FromID, const int bit )
00024 {
00025     QByteArray f,b;
00026     f.setNum(FromID);
00027     b.setNum(bit);
00028     qDebug("TimeCode BitBus : " + f + " sends : " + b);
00029 }
00030 
00031 /** Receives bus data.
00032  **/
00033 void TimeCodePlugin::ByteBus(const int FromID, const int byte )
00034 {
00035     QByteArray f,b;
00036     f.setNum(FromID);
00037     b.setNum(byte);
00038     qDebug("TimeCode ByteBus - " + f + " sends : " + b);
00039 }
00040 
00041 /** Receives bus data.
00042  **/
00043 void TimeCodePlugin::StringBus(const int FromID, const QString str )
00044 {
00045     remote_data(str);
00046 }
00047 
00048 /** Receives remote command string and process.
00049  **/
00050 void TimeCodePlugin::remote_data( QString data )
00051 {
00052     data.remove( remote_protocol() );
00053 
00054     if ( data.startsWith("set|") )
00055     {
00056         data.remove("set|");
00057         qDebug( "TimeCode: Set - " + data.section("|",0,0).toAscii() );
00058         messages->insert( data.section("|",0,0), data.section("|",1) );
00059     }
00060 }
00061 

Generated on Sun Oct 28 22:51:29 2007 for BBoB by  doxygen 1.5.3