Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 09-20-2006
rellik78 rellik78 is offline
Registered User
 
 
Join Date: Sep 2006
Posts: 14
need help

Hai, Marc,Thanks for your reply.
At first I introduce our project. Now we are developing an industrial package which supplies second development function. In this package there is a communication module which supplies a mechanism to connect the up layer system and the lower layer system. At first we planed to use CORBA. But we found that it is so big and complex. So we selected the Ice. The lower system developed based on our package deals with the hardware(machine).The up layer system delivers commands to control the machine through the lower layer system.. The developers of the lower layer system don’t understand Ice and don’t need to write slice files. They will new some objects and methods inherited from the base object supplied by our package. If we use Java, it is very easy to realize converting string(the up layer system’ commands) to object by the reflection mechanism. But we use C++. There is no that kind of mechanism. So it is a key problem to realize the communication module.
I guess Ice maybe supply a kind of mechanism to resolve the problem. But we don’t know how to do. I have read “dynamic Ice”. But it dose not work, I think. So we need your advice badly. Because my English is not good. I wonder whether descript the problem clearly.
Looking forward to your reply.
Best Regards!

Jason
__________________
Name:Hai Wang
Eanglish name:Jason
Company:North Microelectronics
website:bj-nmc.cn
Our project:an industrial package
Project discriptions:
Reply With Quote
  #2 (permalink)  
Old 09-20-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
I don't think Ice (or CORBA for that matter) can do what you want. In order to have two processes communicate using Ice, or to exchange instances of objects using the Ice encoding by some other means, both processes must use data types specified with Slice, meaning that both processes depend on Ice.

(By the way, please do not start a new thread to continue the discussion of a topic. Instead, just reply to the existing thread.)
Reply With Quote
  #3 (permalink)  
Old 09-20-2006
rellik78 rellik78 is offline
Registered User
 
 
Join Date: Sep 2006
Posts: 14
Thanks very much.I got it.We will try to find another way to resolve it through c++.Hope any of your advices.
__________________
Name:Hai Wang
Eanglish name:Jason
Company:North Microelectronics
website:bj-nmc.cn
Our project:an industrial package
Project discriptions:
Reply With Quote
  #4 (permalink)  
Old 09-20-2006
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
I'm sorry to tell you this but since C++ has no reflection or introspection what you want is impossible. The data format must be somehow described otherwise it cannot be marshaled or demarshaled.

So you must make a choice: You can either do this by hand (ie: write code to encode and decode the data yourself), or use some other third party package which will force you do use some type of interface definition language (Ice/CORBA/DCOM/WS, etc).
Reply With Quote
  #5 (permalink)  
Old 09-21-2006
rellik78 rellik78 is offline
Registered User
 
 
Join Date: Sep 2006
Posts: 14
Thank Matthew.
I just read the chapter 33- “the Ice protocol”. The request message body is:
Struct RequstData{
int requestId;
Ice::Identity id;
Ice::StringSeq facet;
string operation;
byte mode;
Ice::Context contex;
Encapsulation params}
When the server receive the request message, how to locate or find the requestId and the operation. They will be found in ASM?
Reply With Quote
  #6 (permalink)  
Old 09-21-2006
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
Before we can help you with any question you must first fill our your signature information as described in the link contained in my signature.

From your question its also not clear what you really want. In what context do you want to look at this?
Reply With Quote
  #7 (permalink)  
Old 09-21-2006
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 834
And once you've entered your signature, don't forget to check the "Show your signature" checkbox in the "Miscalleneous Options" section below the message-posting form.

Edit: This is now done automatically for all new posts!

Cheers,
Bernard
__________________
Bernard Normier
ZeroC, Inc.

Last edited by bernard : 09-21-2006 at 03:45 PM.
Reply With Quote
  #8 (permalink)  
Old 09-21-2006
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 931
Quote:
Originally Posted by rellik78
Code:
Struct RequstData{ 
int requestId; 
Ice::Identity id; 
Ice::StringSeq facet; 
string operation; 
byte mode; 
Ice::Context contex; 
Encapsulation params}
When the server receive the request message, how to locate or find the requestId and the operation. They will be found in ASM?
I'm not quite sure what you mean here. The above header is simply the information that is presented to the server on the wire. The header tells the server which object the request is for (via the identity), and which operation should be invoked on that object (via the operation name). The server uses the identity to locate a servant (either by indexing into the ASM or by asking a servant locator to provide a servant) and then invokes the operation on that servant, passing any paramaters that were unmarshaled.

Cheers,

Michi.
Reply With Quote
  #9 (permalink)  
Old 09-21-2006
rellik78 rellik78 is offline
Registered User
 
 
Join Date: Sep 2006
Posts: 14
Just as you said "operation should be invoked on that object(via the operationn name".I mean,the operation name is a string,how to locate the operation through the string? By function pointer or other ways?
__________________
Name:Hai Wang
Eanglish name:Jason
Company:North Microelectronics
website:bj-nmc.cn
Our project:an industrial package
Project discriptions:

Last edited by rellik78 : 09-21-2006 at 09:47 PM.
Reply With Quote
  #10 (permalink)  
Old 09-21-2006
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
This is all implementation details of the internals of the object adapter and goes far beyond the free support that we provide on this forum. If you are interested in how exactly this works with Ice (and just about every C++ request broker package available) then take a look at the structure of the generated code (for example demo/Ice/hello/Hello.cpp).

If you need more advice on this topic I suggest taking advantage of our consulting & support services. If you are interested please contact sales@zeroc.com.
Reply With Quote
  #11 (permalink)  
Old 09-21-2006
rellik78 rellik78 is offline
Registered User
 
 
Join Date: Sep 2006
Posts: 14
Thank you very much.I see.
__________________
Name:Hai Wang
Eanglish name:Jason
Company:North Microelectronics
website:bj-nmc.cn
Our project:an industrial package
Project discriptions:
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 12:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.