]> rtime.felk.cvut.cz Git - orte.git/blob - orte/liborte/RTPSInfoDST.c
066c53de0f58e082e034effe173e992467d6faf5
[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_all.h"
23
24 /**********************************************************************************/
25 void RTPSInfoDST(CDR_Codec *cdrCodec,MessageInterpret *mi) {
26   CDR_Endianness     data_endian;
27   HostId             hid;
28   AppId              aid;
29
30   data_endian=cdrCodec->data_endian;
31   cdrCodec->data_endian=FLAG_BIG_ENDIAN;
32
33   /* Host Id */
34   CDR_get_ulong(cdrCodec,                          
35                 (CORBA_unsigned_long*)&hid);
36
37   /* App Id */
38   CDR_get_ulong(cdrCodec,                          
39                 (CORBA_unsigned_long*)&aid);
40
41   cdrCodec->data_endian=data_endian;
42
43   debug(42,3) ("  RTPSInfoDST:\n");
44   debug(42,4) ("    hid:0x%x, aid:0x%x\n",hid,aid);
45
46   if (hid!=HID_UNKNOWN) {
47     mi->destHostId=hid;
48   }
49   if (aid!=AID_UNKNOWN) {
50     mi->destAppId=aid;
51   }
52 }
53
54