2 * $Id: RTPSInfoSRC.c,v 0.0.0.1 2003/09/10
4 * DEBUG: section 44 message INFO SRC
6 * -------------------------------------------------------------------
8 * Open Real-Time Ethernet
10 * Copyright (C) 2001-2006
11 * Department of Control Engineering FEE CTU Prague, Czech Republic
12 * http://dce.felk.cvut.cz
13 * http://www.ocera.org
15 * Author: Petr Smolik petr@smoliku.cz
17 * Project Responsible: Zdenek Hanzalek
18 * --------------------------------------------------------------------
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
34 /**********************************************************************************/
36 RTPSInfoSRC(CDR_Codec *cdrCodec, MessageInterpret *mi)
39 ProtocolVersion protocol;
43 char sIPAddress[MAX_STRING_IPADDRESS_LENGTH];
44 CDR_Endianness data_endian;
47 CDR_get_ulong(cdrCodec, (CORBA_unsigned_long *)&ipa);
50 CDR_get_octet(cdrCodec, (CORBA_octet *)&protocol.major);
51 CDR_get_octet(cdrCodec, (CORBA_octet *)&protocol.minor);
54 CDR_get_octet(cdrCodec, (CORBA_octet *)&vid.major);
55 CDR_get_octet(cdrCodec, (CORBA_octet *)&vid.minor);
57 /* next data are sent in big endianing */
58 data_endian = cdrCodec->data_endian;
59 cdrCodec->data_endian = FLAG_BIG_ENDIAN;
62 CDR_get_ulong(cdrCodec, (CORBA_unsigned_long *)&hid);
65 CDR_get_ulong(cdrCodec, (CORBA_unsigned_long *)&aid);
67 cdrCodec->data_endian = data_endian;
69 debug(44, 3) (" RTPSInfoSRC: \n");
70 debug(44, 4) (" appIPAddress:%s\n", IPAddressToString(ipa, sIPAddress));
71 debug(44, 4) (" pv:%lu,%lu vid:%lu,%lu hid:0x%x aid:0x%x\n",
72 protocol.major, protocol.minor, vid.major, vid.minor, hid, aid);
74 mi->sourceHostId = hid;
75 mi->sourceAppId = aid;
76 mi->sourceVersion = protocol;
77 mi->sourceVendorId = vid;
78 mi->unicastReplyIPAddress = ipa;
79 mi->unicastReplyPort = PORT_INVALID;
80 mi->multicastReplyIPAddress = IPADDRESS_INVALID;
81 mi->multicastReplyPort = PORT_INVALID;
82 mi->haveTimestamp = ORTE_FALSE;