#    <OUTPUTFILENAME>
#    Created <DATE> from:
#        Messages = <INPUTFILENAME>
#        Template = <TEMPLATEFILENAME>
#        Language = <LANGUAGEFILENAME>
#
#                     AUTOGENERATED FILE, DO NOT EDIT
import struct
from collections import OrderedDict
from msgtools.lib.conversions import *
from msgtools.lib.messaging import *
import msgtools.lib.messaging as msg
from msgtools.lib.message import Message

class <MSGNAME>(Message):
    ID = <MSGID>
    SIZE = <MSGSIZE>
    MSG_OFFSET = Messaging.hdrSize
    # Enumerations
    <ENUMERATIONS>
    
    def __init__(self, messageBuffer=None, **kwargs):
        super(<MSGNAME>, self).__init__(messageBuffer, id=<MSGNAME>.ID, size=<MSGNAME>.SIZE)
        doInit = 0
        if messageBuffer == None:
            self.initialize()
        self.set_fields(**kwargs)

    def initialize(self):
            <INIT_CODE>
            pass

    def rawBuffer(self):
        # this is a trick to get us to store a copy of a pointer to a buffer, rather than making a copy of the buffer
        return self.msg_buffer_wrapper["msg_buffer"]

    @staticmethod
    def MsgName():
        return "<MSGDESCRIPTOR>"
    # Accessors
    <ACCESSORS>

    # Reflection information
    fields = [ \
        <REFLECTION>\
    ]

Messaging.Register("<MSGDESCRIPTOR>", <MSGNAME>.ID, <MSGNAME>)
Messaging.AddAlias("<MSGALIAS>", <MSGNAME>.ID, <MSGNAME>)
