From: danielnorberto@gmail.com
Subject: Re: How to do multiple instances of a generic packages in automated way. (using ravenscar profile)
Date: Thu, 7 Apr 2016 05:05:20 -0700 (PDT)
Date: 2016-04-07T05:05:20-07:00 [thread overview]
Message-ID: <bcaa90eb-61ec-4ebd-868b-9ef4b2285e23@googlegroups.com> (raw)
In-Reply-To: <56ff6352-590e-4de7-a361-bc2fec0538fb@googlegroups.com>
Thank you for your answer Jeff,
Every buffer needs different configuration in the worst case. The most important part of this configuration is the buffer size.
Im using ada12, but i can't use synchronized-queue containers with ravenscar profile.
I tried sometime ago and several violations raised: "No_Implicit_Heap_Allocations" and "No_Local_Protected objects". That's why i've decided to build my own queue system.
Thank you very much for the library you provided me.
I tried to use pragmarc.queue_bounded_unprotected but it raises other violation of Ravenscar: "Max_Protected_Entries = 1"
So after that i don't have so much options to go on.
I will reduce everything to explain the problem better:
generic
Size_bytes : integer;
package buffer is
protected
put(msg: string);
Entry get(msg : out string);
Private
Content : string(1..size_bytes);
end buffer;
i will need several buffer instances (up to 1000) with different configuration each one (let say only sizes).
I don't know how to do it. I already have 1000 sizes configuration in one array to assign to each buffer. Let's say i have the next variable already filled with all the configurations:
Configuration_array : array (1..1000) of integer;
Now i need to instance every buffer with each one of the element of that array:
Package buffer1 is new (configuration_array(1));
Package buffer2 is new (configuration_array(2));
...
Package buffer1000 is new (configuration_array(1000));
but i need to do it without fill 1000 lines of code.
¿Any ideas?
Thanks for your help in advance.
next prev parent reply other threads:[~2016-04-07 12:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 17:09 How to do multiple instances of a generic packages in automated way. (using ravenscar profile) danielnorberto
2016-04-05 17:39 ` Jeffrey R. Carter
2016-04-05 19:39 ` Simon Wright
2016-04-07 12:05 ` danielnorberto [this message]
2016-04-07 12:36 ` G.B.
2016-04-11 9:14 ` Daniel Norber
2016-04-11 13:04 ` Shark8
2016-04-11 17:25 ` Daniel Norber
2016-04-11 15:58 ` Anh Vo
2016-04-11 17:21 ` Daniel Norber
2016-04-11 17:26 ` Anh Vo
2016-04-11 16:59 ` Jeffrey R. Carter
2016-04-11 17:23 ` Daniel Norber
2016-04-11 17:27 ` Jeffrey R. Carter
2016-04-12 5:19 ` Brad Moore
2016-04-26 15:08 ` Daniel Norber
2016-05-05 21:01 ` rieachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox