trdp源码及用户手册.zip


TRDP(Train Real-time Data Protocol)协议,用于轨道交通实时以太网络,对于铁路用以太网,提高实时性、确保可靠性也是必不可少的条件。研究表明,铁路控制系统需要确保延迟时间在50ms左右,使用以太网TRDP协议即可满足这一要求。标准将通过行业团体“TCNOpen”,以开源的形式公开。其目的在于促进相应产品的开发,以及铁路用以太网的普及,同时削减铁路运营商和铁路车辆企业采购构件的成本。
资源截图
代码片段和文件信息
/**********************************************************************************************************************/
/**
 * @file            echoPolling.c
 *
 * @brief           Demo echoing application for TRDP
 *
 * @details            Receive and send process data single threaded polling static memory
 *
 * @note            Project: TCNOpen TRDP prototype stack
 *
 * @author          Bernd Loehr NewTec GmbH
 *
 * @remarks This Source Code Form is subject to the terms of the Mozilla Public License v. 2.0. 
 *          If a copy of the MPL was not distributed with this file You can obtain one at http://mozilla.org/MPL/2.0/.
 *          Copyright Bombardier Transportation Inc. or its subsidiaries and others 2013. All rights reserved.
 *
 * $Id: echoPolling.c 1455 2015-10-16 16:20:47Z bloehr $*
 *
 */


/***********************************************************************************************************************
 * INCLUDES
 */
#include 
#include 
#include 

#if defined (POSIX)
#include 
#include 
#elif defined (WIN32)
#include “getopt.h“
#endif

#include “trdp_if.h“
#include “vos_thread.h“

/* Some sample comId definitions    */

/* Expect receiving:    */
#define PD_COMID1               1000
#define PD_COMID1_CYCLE         1000000
#define PD_COMID1_TIMEOUT       3000000         /* 3 s    */
#define PD_COMID1_DATA_SIZE     32
#define PD_COMID1_SRC_IP        0x0             /*    Sender‘s IP: 10.0.0.100        */

/* Send as echo:    */
#define PD_COMID2               2001
#define PD_COMID2_CYCLE         100000
#define PD_COMID2_TIMEOUT       1200000
#define PD_COMID2_DATA_SIZE     32
#define PD_COMID2_DST_IP        PD_COMID1_SRC_IP

/* We use static memory    */
#define RESERVED_MEMORY  1000000
UINT8   gMemoryArea[RESERVED_MEMORY];

CHAR8   gBuffer[32] = “Hello World“;

/**********************************************************************************************************************/
/** callback routine for TRDP logging/error output
 *
 *  @param[in]      pRefCon            user supplied context pointer
 *  @param[in]        category        Log category (Error Warning Info etc.)
 *  @param[in]        pTime            pointer to NULL-terminated string of time stamp
 *  @param[in]        pFile            pointer to NULL-terminated string of source module
 *  @param[in]        LineNumber        line
 *  @param[in]        pMsgStr         pointer to NULL-terminated string
 *  @retval         none
 */
void dbgOut (
    void        *pRefCon
    TRDP_LOG_T  category
    const CHAR8 *pTime
    const CHAR8 *pFile
    UINT16      LineNumber
    const CHAR8 *pMsgStr)
{
    const char *catStr[] = {“**Error:“ “Warning:“ “   Info:“ “  Debug:“};
    printf(“%s %s %s:%d %s“
           pTime
           catStr[category]
           pFile
           LineNumber
           pMsgStr);
}




 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-10-27 09:28  trdp
     目录           0  2016-05-20 13:36  trdpld
     文件     3233289  2016-10-24 15:06  trdpBSEN61375-2-3-2015Electronicrailwayequipment.Traincommunicationnetwork(TCN).TCNcommunicati.PDF
     目录           0  2016-10-25 08:55  trdpconfig
     文件         484  2015-08-03 22:31  trdpconfiguildsettings_posix_TEMPLATE
     文件         772  2015-08-03 22:31  trdpconfiguildsettings_vxworks_TEMPLATE
     文件         814  2015-11-20 22:56  trdpconfigLINUX_config
     文件        1437  2015-08-03 22:31  trdpconfigLINUX_PPC_config
     文件         857  2015-08-03 22:31  trdpconfigLINUX_X86_config
     文件         803  2015-12-16 21:10  trdpconfigOSX_X86_config
     文件         704  2015-12-16 21:10  trdpconfigPOSIX_X86_config
     文件         717  2015-08-03 22:31  trdpconfigQNX_X86_config
     文件        1693  2015-08-03 22:31  trdpconfigVXWORKS_KMODE_PPC_config
     文件         763  2015-12-16 21:10  trdpconfigVXWORKS_PPC_config
     文件        1289  2013-05-03 21:23  trdpDeviation Request.txt
     目录           0  2016-10-25 08:55  trdpdoc
     目录           0  2016-10-25 08:55  trdpdocimages
     文件     1802575  2013-06-21 22:59  trdpdocimagesSingleThreadedWorkflowPD.eps
     文件      125461  2013-06-21 22:59  trdpdocimagesSingleThreadedWorkflowPD.pdf
     文件       14343  2012-06-04 19:25  trdpdocimagesTCNOpen.png
     目录           0  2016-05-20 13:37  trdpdoclatex
     目录           0  2016-10-25 08:55  trdpdocLicense Agreements
     文件       19117  2013-08-08 19:39  trdpdocLicense AgreementsMozilla Public License version 2.0.htm
     文件       39424  2014-08-29 22:09  trdpdocmemory.xls
     文件     1158210  2016-03-10 22:50  trdpdocTCN-TRDP2-D-BOM-033-xx - TRDP Reference Manual.pdf
     文件       10683  2016-03-10 01:23  trdpDoxyfile
     目录           0  2016-10-25 08:55  trdpexample
     文件       10500  2015-10-17 00:20  trdpexampleechoPolling.c
     文件       11467  2015-09-04 21:46  trdpexampleechoSelect.c
     文件       14560  2015-09-04 21:46  trdpexampleechoSelectcmdline.c
     文件        4689  2015-08-05 19:05  trdpexampleexample.xml
............此处省略649个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)