public override void OnReceiveHLAregisterObjectInstance(HLAregisterObjectInstanceMessage msg)
        {
            base.OnReceiveHLAregisterObjectInstance(msg);

            AddCallbackRegisterObjectInstance(msg.ObjectInstanceHandle, msg.ObjectClassHandle, msg.ObjectName, 0, 0, null);
        }
        public override void OnReceiveHLAregisterObjectInstance(HLAregisterObjectInstanceMessage msg)
        {
            base.OnReceiveHLAregisterObjectInstance(msg);

            Lrc.DiscoverObjectInstanceCallback callback =
                new Lrc.DiscoverObjectInstanceCallback(this.parent.MetaFederateAmbassador,
                    new XRTIObjectInstanceHandle(msg.ObjectInstanceHandle),
                        new XRTIObjectClassHandle(msg.ObjectClassHandle), msg.ObjectName);

            callback.Call();
        }
 ///<summary>
 ///Registers a new object instance. 
 ///</summary>
 ///<param name="msg"> the message associated with the interaction</param>
 ///<exception cref="InteractionClassNotRecognized"> if the interaction class was not recognized</exception>
 ///<exception cref="InteractionParameterNotRecognized"> if a parameter of the interaction was not
 /// recognized</exception>
 ///<exception cref="InteractionClassNotSubscribed"> if the federate had not subscribed to the
 /// interaction class</exception>
 ///<exception cref="FederateInternalError"> if an error occurs in the federate</exception>
 public abstract void OnReceiveHLAregisterObjectInstance(HLAregisterObjectInstanceMessage msg);
 public override void OnReceiveHLAregisterObjectInstance(HLAregisterObjectInstanceMessage msg)
 {
     if (log.IsDebugEnabled)
         log.Debug("[" + federationName + "] Received HLAregisterObjectInstance =  " + msg.ToString());
 }
        ///<summary> Reads this HLAregisterObjectInstanceMessage from the specified stream.</summary>
        ///<param name="reader"> the input stream to read from</param>
        ///<returns> the object</returns>
        ///<exception cref="IOException"> if an error occurs</exception>
        public override object Deserialize(HlaEncodingReader reader, ref object msg)
        {
            /* msg2
            HLAregisterObjectInstanceMessage msg = new HLAregisterObjectInstanceMessage();
            msg.CopyTo((BaseInteractionMessage)msg2);

            try
            {
                msg.ObjectName = reader.ReadHLAunicodeString();
                msg.ObjectInstanceHandle = reader.ReadHLAinteger64BE();
                msg.ObjectClassHandle = reader.ReadHLAinteger64BE();
            }
            catch (IOException ioe)
            {
                throw new RTIinternalError(ioe.ToString());
            }
            return msg;
            */

            HLAregisterObjectInstanceMessage decodedValue;
            if (!(msg is HLAregisterObjectInstanceMessage))
            {
                decodedValue = new HLAregisterObjectInstanceMessage();
                BaseInteractionMessage baseMsg = msg as BaseInteractionMessage;
                decodedValue.CopyTo(baseMsg);
                //decodedValue.InteractionClassHandle = baseMsg.InteractionClassHandle;
                //decodedValue.FederationExecutionHandle = baseMsg.FederationExecutionHandle;
                //decodedValue.UserSuppliedTag = baseMsg.UserSuppliedTag;
            }
            else
            {
                decodedValue = msg as HLAregisterObjectInstanceMessage;
            }
            object tmp = decodedValue;

            try
            {
                decodedValue = base.Deserialize(reader, ref tmp) as HLAregisterObjectInstanceMessage;

                decodedValue.ObjectName = reader.ReadHLAunicodeString();
                decodedValue.ObjectInstanceHandle = reader.ReadHLAinteger64BE();
                decodedValue.ObjectClassHandle = reader.ReadHLAinteger64BE();
            }
            catch (System.IO.IOException ioe)
            {
                throw new RTIinternalError(ioe.ToString());
            }
            return decodedValue;
        }