public void WriteEnumDataType(StreamWriter writer, EnumDataType datatype)
        {
            writer.WriteLine("/* Enum Datatype : " + datatype.Name + " */");

            /* Write datatype */
            writer.WriteLine("typedef enum ");
            writer.WriteLine("{");

            /* Write values */
            for (int i = 0; i < datatype.Fields.Count; i++)
            {
                writer.Write(RteFunctionsGenerator.CreateEnumValue(datatype.Fields[i]));
                writer.WriteLine(",");
            }

            /* Write elements count */
            //writer.WriteLine("    " + datatype.Name + "_ELEMENTS_COUNT");

            writer.WriteLine("} " + datatype.Name + ";");
            writer.WriteLine("");

            int minLimit = datatype.GetLimit(LimitType.ltLowerLimit);
            String defineMin = RteFunctionsGenerator.CreateDefine(datatype.Name + "_LOWER_LIMIT", minLimit.ToString());
            writer.WriteLine(defineMin);

            int upperLimit = datatype.GetLimit(LimitType.ltUpperLimit);
            String defineMax = RteFunctionsGenerator.CreateDefine(datatype.Name + "_UPPER_LIMIT", upperLimit.ToString());
            writer.WriteLine(defineMax);

            writer.WriteLine("");

            /* Generate an array if it existis*/
            ArrayDataTypeGenerator.GenerateArrayForDataType(writer, datatype);
        }