Changeset 126 in pacpussensors


Ignore:
Timestamp:
05/20/16 15:17:57 (8 years ago)
Author:
DHERBOMEZ Gérald
Message:

StringGenerator component added to test PacpusUDPSocket
XML file to test provided

Location:
trunk/PacpusSocket
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PacpusSocket/CMakeLists.txt

    r99 r126  
    1 #########################quick start############################################
    2 #cmake ../ -G "CodeBlocks - Unix Makefiles"
    3 #make
    4 #make install
    5 #make clean
    6 ################################################################################
    71project(PacpusSocket)
    82set(${PROJECT_NAME}_VERSION_MAJOR 0)
     
    3832    PacpusSocketAirplug.h
    3933    PacpusUDPSocket.h
     34    StringGenerator.h
    4035)
    4136set(PROJECT_SRCS
     
    4338    PacpusSocketAirplug.cpp
    4439    PacpusUDPSocket.cpp
     40    StringGenerator.cpp
    4541)
    4642
     
    4844    ${PLUGIN_HDR}
    4945    PacpusSocketAirplug.h
    50     PacpusUDPSocket.h
     46    PacpusUDPSocket.h
     47    StringGenerator.h
    5148)
    5249
  • trunk/PacpusSocket/PacpusUDPSocket.cpp

    r99 r126  
    125125{
    126126        int sent=0;
     127
     128    LOG_INFO("component " << name() << " sent " << frame);
    127129
    128130        if (socketType_ == "client")
     
    179181                if(udpSocket_->readDatagram(datagram.data(), datagram.size(),  &sender, &senderPort) != -1)
    180182                {
     183
     184            LOG_INFO("component " << name() << " received " << QString(datagram.data()));
     185
    181186                    if (socketType_ == "server")
    182187                    {
     
    192197                                        listClients << new Client(sender, senderPort);
    193198                        }
     199
    194200
    195201                        if (udpSocketOutput_ && udpSocketOutput_->hasConnection())
  • trunk/PacpusSocket/socket_udp_test.xml

    r125 r126  
    1414                        port="1200"
    1515                        address="127.0.0.1"/>
    16         <component name="emitter" type="TestPacpusSocket" 
    17                         socketComponent="node_1"
     16        <component name="emitter" type="StringGenerator" 
    1817                        />
    19 
    2018                </components>
    2119                        <connections>
     20                                <connection input="node_2.string" output="emitter.string" type="direct" priority="1"/>
     21                                <connection input="node_1.string" output="emitter.string" type="direct" priority="1"/>
    2222      </connections>
    2323        <plugins prefix="lib" postfix="" extension="so">
Note: See TracChangeset for help on using the changeset viewer.