VectorChar and VectorBool field type enumerator


Alireza Assadzadeh <Alireza.Assadzadeh@...>
 

Hi folks,

 

I noticed that VectorChar and VectorBool do not have  a field type enumerator  in Mama (i.e. mamaFieldType enum in mama/fielddesc.h). Also, the related code for VectorChar and VectorBool in C/ C++, C#, JNI does not have the type related implementations for these vector types as compared to other vector types, such as VectorU32 (enumerator: MAMA_FIELD_TYPE_VECTOR_U32).

 

I imagine these types may not be widely and there are alternatives field types for them(e.g. Opaque, String and unsinged integer).

 

Should VectorChar and VectorBool  types be included in the mamaFieldType enum? For example with the numbers shown below:

 

<code>

diff --git a/mama/c_cpp/src/c/mama/fielddesc.h b/mama/c_cpp/src/c/mama/fielddesc.h

index e3af6e1..a374489 100644

--- a/mama/c_cpp/src/c/mama/fielddesc.h

+++ b/mama/c_cpp/src/c/mama/fielddesc.h

@@ -90,6 +90,8 @@ typedef enum mamaFieldType_

     MAMA_FIELD_TYPE_PRICE         =   27,

 

     /** Array type support */

+    MAMA_FIELD_TYPE_VECTOR_BOOL   =   29,

+    MAMA_FIELD_TYPE_VECTOR_CHAR   =   30,

     MAMA_FIELD_TYPE_VECTOR_I8     =   34,

     MAMA_FIELD_TYPE_VECTOR_U8     =   35,

     MAMA_FIELD_TYPE_VECTOR_I16    =   36,

</code>

 

And then also have the corresponding type related changes in the rest of Mama codebase?

 

Regards,.

 

--Alireza


Damian Maguire
 

Hey Alireza,

Thanks for sending this through, and sorry about the delayed response. In this case, I agree that these values should be added to the mamaFieldType enum, and their implementations should be completed across all the languages. 

At this stage you've really got two options - either raise a Bugzilla ticket and we'll see about getting it added when we have a chance, or submit a patch yourself which addresses the problems. For the patching option, that can be approached in stages easily enough - beginning with the enum updates (and associated mamaFieldTypeToString and stringToMamaFieldType changes, along with anything else which may misbehave given the new values), then filling in each of the language gaps in further commits.

Obviously we're happy to assist if you go down the route of patching yourself, just drop us a mail and we'll lend a hand.

Cheers, 

Damian

On Fri, Sep 5, 2014 at 8:35 PM, Alireza Assadzadeh <Alireza.Assadzadeh@...> wrote:

Hi folks,

 

I noticed that VectorChar and VectorBool do not have  a field type enumerator  in Mama (i.e. mamaFieldType enum in mama/fielddesc.h). Also, the related code for VectorChar and VectorBool in C/ C++, C#, JNI does not have the type related implementations for these vector types as compared to other vector types, such as VectorU32 (enumerator: MAMA_FIELD_TYPE_VECTOR_U32).

 

I imagine these types may not be widely and there are alternatives field types for them(e.g. Opaque, String and unsinged integer).

 

Should VectorChar and VectorBool  types be included in the mamaFieldType enum? For example with the numbers shown below:

 

<code>

diff --git a/mama/c_cpp/src/c/mama/fielddesc.h b/mama/c_cpp/src/c/mama/fielddesc.h

index e3af6e1..a374489 100644

--- a/mama/c_cpp/src/c/mama/fielddesc.h

+++ b/mama/c_cpp/src/c/mama/fielddesc.h

@@ -90,6 +90,8 @@ typedef enum mamaFieldType_

     MAMA_FIELD_TYPE_PRICE         =   27,

 

     /** Array type support */

+    MAMA_FIELD_TYPE_VECTOR_BOOL   =   29,

+    MAMA_FIELD_TYPE_VECTOR_CHAR   =   30,

     MAMA_FIELD_TYPE_VECTOR_I8     =   34,

     MAMA_FIELD_TYPE_VECTOR_U8     =   35,

     MAMA_FIELD_TYPE_VECTOR_I16    =   36,

</code>

 

And then also have the corresponding type related changes in the rest of Mama codebase?

 

Regards,.

 

--Alireza


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev



Alireza Assadzadeh <Alireza.Assadzadeh@...>
 

Hi Damian,

 

I have raised Bugzilla ticket 168 (http://bugs.openmama.org/show_bug.cgi?id=168) and provided a patch to address this for C/C++ for the first stage.

 

Thanks.

 

--Alireza

 

From: Damian Maguire [mailto:damian@...]
Sent: Friday, September 19, 2014 11:32 AM
To: Alireza Assadzadeh
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] VectorChar and VectorBool field type enumerator

 

Hey Alireza,

 

Thanks for sending this through, and sorry about the delayed response. In this case, I agree that these values should be added to the mamaFieldType enum, and their implementations should be completed across all the languages. 

 

At this stage you've really got two options - either raise a Bugzilla ticket and we'll see about getting it added when we have a chance, or submit a patch yourself which addresses the problems. For the patching option, that can be approached in stages easily enough - beginning with the enum updates (and associated mamaFieldTypeToString and stringToMamaFieldType changes, along with anything else which may misbehave given the new values), then filling in each of the language gaps in further commits.

 

Obviously we're happy to assist if you go down the route of patching yourself, just drop us a mail and we'll lend a hand.

 

Cheers, 

 

Damian

 

On Fri, Sep 5, 2014 at 8:35 PM, Alireza Assadzadeh <Alireza.Assadzadeh@...> wrote:

Hi folks,

 

I noticed that VectorChar and VectorBool do not have  a field type enumerator  in Mama (i.e. mamaFieldType enum in mama/fielddesc.h). Also, the related code for VectorChar and VectorBool in C/ C++, C#, JNI does not have the type related implementations for these vector types as compared to other vector types, such as VectorU32 (enumerator: MAMA_FIELD_TYPE_VECTOR_U32).

 

I imagine these types may not be widely and there are alternatives field types for them(e.g. Opaque, String and unsinged integer).

 

Should VectorChar and VectorBool  types be included in the mamaFieldType enum? For example with the numbers shown below:

 

<code>

diff --git a/mama/c_cpp/src/c/mama/fielddesc.h b/mama/c_cpp/src/c/mama/fielddesc.h

index e3af6e1..a374489 100644

--- a/mama/c_cpp/src/c/mama/fielddesc.h

+++ b/mama/c_cpp/src/c/mama/fielddesc.h

@@ -90,6 +90,8 @@ typedef enum mamaFieldType_

     MAMA_FIELD_TYPE_PRICE         =   27,

 

     /** Array type support */

+    MAMA_FIELD_TYPE_VECTOR_BOOL   =   29,

+    MAMA_FIELD_TYPE_VECTOR_CHAR   =   30,

     MAMA_FIELD_TYPE_VECTOR_I8     =   34,

     MAMA_FIELD_TYPE_VECTOR_U8     =   35,

     MAMA_FIELD_TYPE_VECTOR_I16    =   36,

</code>

 

And then also have the corresponding type related changes in the rest of Mama codebase?

 

Regards,.

 

--Alireza


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev

 


Damian Maguire
 

Awesome, looks really great Alireza. I'll take a look through the patches attached to the Bugzilla and provide any feedback there. 

Obviously you've put a lot of effort into the testing here, really nice work on that. What platform's have you been looking at? Just Linux, or any Windows testing as well?

Thanks, 

Damian 

On Mon, Oct 27, 2014 at 3:15 PM, Alireza Assadzadeh <Alireza.Assadzadeh@...> wrote:

Hi Damian,

 

I have raised Bugzilla ticket 168 (http://bugs.openmama.org/show_bug.cgi?id=168) and provided a patch to address this for C/C++ for the first stage.

 

Thanks.

 

--Alireza

 

From: Damian Maguire [mailto:damian@...]
Sent: Friday, September 19, 2014 11:32 AM
To: Alireza Assadzadeh
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] VectorChar and VectorBool field type enumerator

 

Hey Alireza,

 

Thanks for sending this through, and sorry about the delayed response. In this case, I agree that these values should be added to the mamaFieldType enum, and their implementations should be completed across all the languages. 

 

At this stage you've really got two options - either raise a Bugzilla ticket and we'll see about getting it added when we have a chance, or submit a patch yourself which addresses the problems. For the patching option, that can be approached in stages easily enough - beginning with the enum updates (and associated mamaFieldTypeToString and stringToMamaFieldType changes, along with anything else which may misbehave given the new values), then filling in each of the language gaps in further commits.

 

Obviously we're happy to assist if you go down the route of patching yourself, just drop us a mail and we'll lend a hand.

 

Cheers, 

 

Damian

 

On Fri, Sep 5, 2014 at 8:35 PM, Alireza Assadzadeh <Alireza.Assadzadeh@...> wrote:

Hi folks,

 

I noticed that VectorChar and VectorBool do not have  a field type enumerator  in Mama (i.e. mamaFieldType enum in mama/fielddesc.h). Also, the related code for VectorChar and VectorBool in C/ C++, C#, JNI does not have the type related implementations for these vector types as compared to other vector types, such as VectorU32 (enumerator: MAMA_FIELD_TYPE_VECTOR_U32).

 

I imagine these types may not be widely and there are alternatives field types for them(e.g. Opaque, String and unsinged integer).

 

Should VectorChar and VectorBool  types be included in the mamaFieldType enum? For example with the numbers shown below:

 

<code>

diff --git a/mama/c_cpp/src/c/mama/fielddesc.h b/mama/c_cpp/src/c/mama/fielddesc.h

index e3af6e1..a374489 100644

--- a/mama/c_cpp/src/c/mama/fielddesc.h

+++ b/mama/c_cpp/src/c/mama/fielddesc.h

@@ -90,6 +90,8 @@ typedef enum mamaFieldType_

     MAMA_FIELD_TYPE_PRICE         =   27,

 

     /** Array type support */

+    MAMA_FIELD_TYPE_VECTOR_BOOL   =   29,

+    MAMA_FIELD_TYPE_VECTOR_CHAR   =   30,

     MAMA_FIELD_TYPE_VECTOR_I8     =   34,

     MAMA_FIELD_TYPE_VECTOR_U8     =   35,

     MAMA_FIELD_TYPE_VECTOR_I16    =   36,

</code>

 

And then also have the corresponding type related changes in the rest of Mama codebase?

 

Regards,.

 

--Alireza


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev

 



Alireza Assadzadeh <Alireza.Assadzadeh@...>
 

On Wednesday, October 29, 2014 at 12:45 PM, Damian Maguire <damian@openmama.org> wrote:

Awesome, looks really great Alireza. I'll take a look through the patches attached to the Bugzilla
and provide any feedback there. 
Great. Thanks.


Obviously you've put a lot of effort into the testing here, really nice work on that. What platform's
have you been looking at? Just Linux, or any Windows testing as well?
For this I was using primarily 64-bit Linux (Fedora 20, x86_64) and that's where I did most of the testing, including the unit testing.

On Windows, I did a build for mamda with qpid for 64-bit and tested it with capturereplayc, mamalistenc, and bookticker to ensure there is no regressions.

--Alireza