/*
    <OUTPUTFILENAME>
    Created <DATE> from:
        Messages = <INPUTFILENAME>
        Template = <TEMPLATEFILENAME>
        Language = <LANGUAGEFILENAME>

                     AUTOGENERATED FILE, DO NOT EDIT

*/
#ifndef <MSGFULLNAME>Message_H__
#define <MSGFULLNAME>Message_H__

#include <stdint.h>
#include <cfloat>
#include "FieldAccess.h"

class <MSGFULLNAME>Message : public Message
{
    public:
        auto static constexpr MSG_ID = <MSGID>;
        auto static constexpr MSG_SIZE = <MSGSIZE>;
        <MSGFULLNAME>Message(int size=MSG_SIZE)
        : Message(size)
        {
            if(Exists())
            {
                SetDataLength(size);
                SetMessageID(MSG_ID);
                InitializeTime();
                Init();
            }
        }
        <MSGFULLNAME>Message(MessageBuffer* buffer, int size=MSG_SIZE)
        : Message(buffer)
        {
            if(Exists())
            {
                SetDataLength(size);
                SetMessageID(MSG_ID);
                InitializeTime();
                Init();
            }
        }
        void Init()
        {
            <INIT_CODE>
        }
        <ENUMERATIONS>
        <FIELDINFOS>
        <ACCESSORS>
#ifdef ENABLE_REFLECTION
        static MsgInfo* ReflectionInfo()
        {
            static bool firstTime = true;
            static MsgInfo msgInfo(MSG_ID, "<MSGFULLNAME>", "<MSGDESCRIPTION>", MSG_SIZE);
            if(firstTime)
            {
                firstTime = false;
                msgInfo.AddField(new <REFLECTION>);
            }
            return &msgInfo;
        }
#endif
};

#ifdef ENABLE_REFLECTION
class <MSGFULLNAME>MessageReflection
{
public:
    <MSGFULLNAME>MessageReflection()
    {
        Reflection::AddMsg(<MSGFULLNAME>Message::ReflectionInfo());
    }
};
static <MSGFULLNAME>MessageReflection reflection_<MSGFULLNAME>Message;
#endif
#endif
