summaryrefslogtreecommitdiff
path: root/pluginRoutingInterfaceTCP/RoutingSend.cpp
diff options
context:
space:
mode:
authorSimon Brandner <simon.brandner@partner.bmw.de>2011-07-01 15:06:11 +0200
committerSimon Brandner <simon.brandner@partner.bmw.de>2011-07-01 15:06:11 +0200
commit9d723d9b3918d8c9227b806aa9f016699e234a15 (patch)
tree9ec0170ee232818761a8e6046652bff2be9686b5 /pluginRoutingInterfaceTCP/RoutingSend.cpp
parentd61f9cbeeb25c02d73fc99170b1bdf0cc802002f (diff)
parente6ad5d883663688d0e36e9d506aa9a1f1190c47f (diff)
downloadaudiomanager-9d723d9b3918d8c9227b806aa9f016699e234a15.tar.gz
Merge branch 'master' of 10.250.89.137:audiomangenivi
Diffstat (limited to 'pluginRoutingInterfaceTCP/RoutingSend.cpp')
-rw-r--r--pluginRoutingInterfaceTCP/RoutingSend.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/pluginRoutingInterfaceTCP/RoutingSend.cpp b/pluginRoutingInterfaceTCP/RoutingSend.cpp
new file mode 100644
index 0000000..71829ac
--- /dev/null
+++ b/pluginRoutingInterfaceTCP/RoutingSend.cpp
@@ -0,0 +1,46 @@
+/*
+ * Bus_Interface.cpp
+ *
+ * Created on: Jan 19, 2011
+ * Author: demo
+ */
+#include <iostream>
+
+
+#include "RoutingSend.h"
+#include "routinginterface.h"
+#include "tcpMessages.h"
+
+
+using namespace std;
+
+
+void RoutingSendTcp::startup_interface(RoutingReceiveInterface* audioman){
+ audiomanager=audioman;
+ m_server=new TcpServer(AUDIOMAN_PORT);
+ m_client=new tcpClient(BEAGLE_IP,BEAGLE_PORT);
+ m_server->registerAudioManager(audiomanager);
+ cout<<"server started"<<endl;
+}
+
+void RoutingSendTcp::return_BusName(char* BusName) {
+ strcpy(BusName,BUS_NAME);
+}
+
+int RoutingSendTcp::Connect(int source, int sink){
+ return m_client->connect(source,sink);
+}
+
+void RoutingSendTcp::system_ready() {
+
+ m_client->system_ready();
+ cout<<"Tcp ready"<<endl;
+
+}
+
+
+RoutingSendInterface* SampleRoutingInterfaceTcpFactory::returnInstance(){
+ return new RoutingSendTcp();
+}
+
+Q_EXPORT_PLUGIN2(RoutingTcpPlugin, SampleRoutingInterfaceTcpFactory);