]> rtime.felk.cvut.cz Git - orte.git/blob - orte/liborte/RTPSInfoDST.c
b440e51dfbc705b748f02003d2d98cce3d17e864
[orte.git] / orte / liborte / RTPSInfoDST.c
1 /*
2  *  $Id: RTPSInfoDST.c,v 0.0.0.1        2003/08/21
3  *
4  *  DEBUG:  section 42                  message INFO DST
5  *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
6  *
7  *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
8  *  --------------------------------------------------------------------
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *  
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *  
20  */ 
21
22 #include "orte.h"
23
24 /**********************************************************************************/
25 void RTPSInfoDST(uint8_t *rtps_msg,MessageInterpret *mi) {
26   HostId             hid;
27   AppId              aid;
28
29   //parsing
30   hid=*((HostId*)(rtps_msg+4));                 /* HostId */
31   conv_u32(&hid,0);
32   aid=*((uint32_t*)(rtps_msg+8));              /* AppId */
33   conv_u32(&aid,0);
34
35   debug(42,3) ("  RTPSInfoDST:\n");
36   debug(42,4) ("    hid:0x%x, aid:0x%x\n",hid,aid);
37
38   if (hid!=HID_UNKNOWN) {
39     mi->destHostId=hid;
40   }
41   if (aid!=AID_UNKNOWN) {
42     mi->destAppId=aid;
43   }
44 }
45
46