
/*
  WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.

  This file was generated from .idl using "rtiddsgen".
  The rtiddsgen tool is part of the RTI Connext distribution.
  For more information, type 'rtiddsgen -help' at a command shell
  or consult the RTI Connext manual.
*/
    
package TelebotDDSCore.Source.Java.Generated.master.arms;
        

import com.rti.dds.infrastructure.*;
import com.rti.dds.infrastructure.Copyable;

import java.io.Serializable;
import com.rti.dds.cdr.CdrHelper;


public class TMasterToArms implements Copyable, Serializable
{

    public int servoId = 0;
    public int servoPositon = 0;
    public int servoSpeed = 0;


    public TMasterToArms() {

    }


    public TMasterToArms(TMasterToArms other) {

        this();
        copy_from(other);
    }



    public static Object create() {
        TMasterToArms self;
        self = new TMasterToArms();
         
        self.clear();
        
        return self;
    }

    public void clear() {
        
        servoId = 0;
            
        servoPositon = 0;
            
        servoSpeed = 0;
            
    }

    public boolean equals(Object o) {
                
        if (o == null) {
            return false;
        }        
        
        

        if(getClass() != o.getClass()) {
            return false;
        }

        TMasterToArms otherObj = (TMasterToArms)o;



        if(servoId != otherObj.servoId) {
            return false;
        }
            
        if(servoPositon != otherObj.servoPositon) {
            return false;
        }
            
        if(servoSpeed != otherObj.servoSpeed) {
            return false;
        }
            
        return true;
    }

    public int hashCode() {
        int __result = 0;

        __result += (int)servoId;
                
        __result += (int)servoPositon;
                
        __result += (int)servoSpeed;
                
        return __result;
    }
    

    /**
     * This is the implementation of the <code>Copyable</code> interface.
     * This method will perform a deep copy of <code>src</code>
     * This method could be placed into <code>TMasterToArmsTypeSupport</code>
     * rather than here by using the <code>-noCopyable</code> option
     * to rtiddsgen.
     * 
     * @param src The Object which contains the data to be copied.
     * @return Returns <code>this</code>.
     * @exception NullPointerException If <code>src</code> is null.
     * @exception ClassCastException If <code>src</code> is not the 
     * same type as <code>this</code>.
     * @see com.rti.dds.infrastructure.Copyable#copy_from(java.lang.Object)
     */
    public Object copy_from(Object src) {
        

        TMasterToArms typedSrc = (TMasterToArms) src;
        TMasterToArms typedDst = this;

        typedDst.servoId = typedSrc.servoId;
            
        typedDst.servoPositon = typedSrc.servoPositon;
            
        typedDst.servoSpeed = typedSrc.servoSpeed;
            
        return this;
    }


    
    public String toString(){
        return toString("", 0);
    }
        
    
    public String toString(String desc, int indent) {
        StringBuffer strBuffer = new StringBuffer();        
                        
        
        if (desc != null) {
            CdrHelper.printIndent(strBuffer, indent);
            strBuffer.append(desc).append(":\n");
        }
        
        
        CdrHelper.printIndent(strBuffer, indent+1);            
        strBuffer.append("servoId: ").append(servoId).append("\n");
            
        CdrHelper.printIndent(strBuffer, indent+1);            
        strBuffer.append("servoPositon: ").append(servoPositon).append("\n");
            
        CdrHelper.printIndent(strBuffer, indent+1);            
        strBuffer.append("servoSpeed: ").append(servoSpeed).append("\n");
            
        return strBuffer.toString();
    }
    
}

