[omniORB] omniidl does not generate code - I'm mystified...
Frank Goenninger
frgo at me.com
Sat Nov 14 16:51:59 GMT 2009
Am 14.11.2009 um 16:25 schrieb Kevin Bailey:
> On Sat, Nov 14, 2009 at 10:14:30AM +0100, Frank Goenninger wrote:
>> Hello all,
>>
>> being a bloody beginner I am trying to get omniidl to generate code
>> from
>> the following IDL file:
>>
>> -X-X-X-
>>
>> #ifndef __FLEXIO__
>> #define __FLEXIO__
>>
>> #pragma prefix "flexio.goenninger.net"
>>
>> module FlexIO
>> {
>> typedef long rc_t;
>> typedef unsigned long operation_t;
>> typedef unsigned long data_t;
>> typedef unsigned long * data_ptr;
>> typedef unsigned long device_id_t;
>>
>> interface LowLevelIO
>> {
>> rc_t select_device( in device_id_t device_id );
>>
>> rc_t read( in operation_t operation,
>> in data_t data1,
>> in data_t data2,
>> out data_ptr rtn );
>
> CORBA hasn't added pointers since I last used it, has it ?
No, it didn't, you're right. Yet I did not get any error output of
omniidl. Stupid me, that's what I expected when I am using some
illegal syntax in an IDL file.
> If not... How would CORBA implement them on platforms
> without pointers ? What good would a pointer be to a completely
> different process on a completely different host ? Different
> architecture perhaps.
Pointers are a mess of a concept to begin with, so better not
implement them at all ;-)
>
> Instead, just use "out" parameters to implement returned data
> (as you seem to have done.)
>
> rc_t read(...
> out data_t rtn);
>
> Or maybe an out array if it will return multiple words.
Brave as I am I changed my IDL file to the following:
-X-X-X-
#ifndef __FLEXIO__
#define __FLEXIO__
#pragma prefix "flexio.goenninger.net"
module FlexIO
{
typedef long rc_t;
typedef unsigned long device_id_t;
typedef unsigned long bus_id_t;
struct FlexIOServerInfo
{
string ip_hostname;
unsigned long tcp_port;
};
typedef struct FlexIOServerInfo flexioserverinfo_t;
struct FlexIODeviceInfo
{
device_id_t id;
string name;
flexioserverinfo_t server;
bus_id_t bus_id;
};
typedef sequence<FlexIODeviceInfo> flexiodeviceinfoseq_t;
struct FlexIOInfo
{
long nr_devices;
flexiodeviceinfoseq_t device_info_list;
};
typedef struct FlexIOInfo flexioinfo_t;
interface DeviceSelection
{
rc_t get_flexio_info( out flexioinfo_t flex_io_info );
rc_t select_device( in device_id_t device_id );
};
typedef unsigned long flexio_op_id_t;
typedef unsigned long flexio_data_t;
interface LowLevelIO
{
rc_t read( in flexio_op_id_t operation,
in flexio_data_t data1,
in flexio_data_t data2,
out flexio_data_t return_value );
rc_t write( in flexio_op_id_t operation,
in flexio_data_t data1,
in flexio_data_t data2 );
};
};
#endif
-X-X-X-
... a bit more complex, but in line with what I can read in my Corba
book "Pure Corba" (SAMS, Fintan Bolton). No pointers used. Still no
output.
A call to omniidl to verify the IDL file returns no errors. Ok, I am
just about to try some other ORB for this ... Or does OmniORB behave a
bit different? In which way?
Mayday! Mayday! Lost engine 1 and 2, engine 3 on fire - engine 4
almost without fuel ...
Frank
More information about the omniORB-list
mailing list