Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » Can I try factory on 3.20.xx ?
Can I try factory on 3.20.xx ? [message #625014] Wed, 22 September 2010 07:01 Go to next message
Naoki Kawada is currently offline Naoki KawadaFriend
Messages: 10
Registered: June 2010
Junior Member
Hi,

xdctools version 3.20.xx has already been available.

Question : Can I try a new proxy called "factory" by referring to ..

http://rtsc.eclipse.org/docs-tip/RTSC_Interface_Primer/Lesso n_15

This article says that ...

NOTE: This lesson leverages some new proxy capabilities slated for XDCtools 3.20.
NOTE: For now, just treat the programming examples as "read-only".

If "factory" is not still available, could you please let me know when it is scheduled.

Best Regards,
Kawada

Re: Can I try factory on 3.20.xx ? [message #628961 is a reply to message #625014] Fri, 24 September 2010 22:11 Go to previous messageGo to next message
Sasha Slijepcevic is currently offline Sasha SlijepcevicFriend
Messages: 115
Registered: July 2009
Senior Member
Kawada,
the work required to implement that functionality is sizeable and we couldn't fit it in 3.20 schedule. The next release 3.21 is in November, but as far as I know no work has been done on proxy factories.
I remember you asked about it before. Can you tell us more what are you trying to do? We might be able to come up with a temporary solution until we implement proxy factories.

Thanks,
Sasha
Re: Can I try factory on 3.20.xx ? [message #629623 is a reply to message #625014] Wed, 29 September 2010 01:26 Go to previous messageGo to next message
Naoki Kawada is currently offline Naoki KawadaFriend
Messages: 10
Registered: June 2010
Junior Member
Hi Sasha,

Thanks for the reply.

I have a Moudle called ProcUnit(Process Unit, embedding sysbios Task, Event, ipc MessageQ etc...) and its instances are created with a parameter having IProcProvider_Handle.
This means the implementation inheriting IProcProvider can be plugged into ProcUnit instance. Now, I want to characterize all of implementations via .cfg file and trigger them in run-time by using "unified" API.

Scenario :
Create all modules inheriting IProcProvider by using unified API, upcast them to IProcProvider_Handle and pass them to ProcUnit_create().

I don't know whether this scenario is possible or not, but Factory seems to be a one of solution.

Regards,
Kawada
Re: Can I try factory on 3.20.xx ? [message #792271 is a reply to message #629623] Mon, 06 February 2012 20:32 Go to previous message
Sasha Slijepcevic is currently offline Sasha SlijepcevicFriend
Messages: 115
Registered: July 2009
Senior Member
Kawada,
I know this thread is very old and probably not relevant any more to you, but I'll answer in case you come upon a similar issue later.
So, if I understand your scenario correctly, instance factories would work for you, but there could be a different solution that can be implemented without instance factories.

At runtime, you can always call
IProcProvider_create, but you have to pass something to that call that will specify one of the modules inheriting IProcProvider. What you will need to pass is basically a pointer to the virtual function table for the specific module. For example, if you have modules ProviderA and ProviderB, you can create instances of each using these two calls, and appropriate variables:
IProcProvider_Handle pA, pB;
ProviderA_Params AParams;
ProviderB_Params BParams;

pA = IProcProvider_create(ProviderA_Module_upCast(), (struct IProcProvider_Params*)&AParams, NULL);
pB = IProcProvider_create(ProviderB_Module_upCast(), (struct IProcProvider_Params*)&BParams, NULL);


Because IProcProvider_create returns IProcProvider_Handle, you can pass these handles directly to ProcUnit_create calls:
ProcUnit_Handle pu1, pu2;
pu1 = ProcUnit_create(pA);
pu2 = ProcUnit_create(pB);


A disadvantage of this approach is that you have to know at runtime which modules implement IProcProvider interface. But, it seemed to me from your description that you prefer to create them at runtime, and in that case modules' names have to show up in the runtime code. Even factories wouldn't help you there because they also require you to specify a module when creating instances.
Previous Topic:How to add user library (Linux)
Next Topic:How to get *Multiple* libraries at getLibs handler
Goto Forum:
  


Current Time: Thu Apr 25 14:59:45 GMT 2024

Powered by FUDForum. Page generated in 0.04059 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top