Changeset 151:cfd2486e8c12 in finroc_plugins_data_types-java


Ignore:
Timestamp:
08.06.2017 03:21:33 (2 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Adapts type adapters to changes in finroc_core

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • AngleTypeAdapter.java

    r144 r151  
    4545    public boolean handlesType(RemoteType remoteType, Info adapterInfo) { 
    4646        if (remoteType.getName().startsWith("rrlib.math.Angle<double,") && remoteType.getName().endsWith(">")) { 
    47             adapterInfo.localType = Angle.class; 
     47            adapterInfo.localType = Angle.TYPE; 
    4848            adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    4949            adapterInfo.customAdapterData1 = remoteType.getName().contains("rrlib.math.angle.Degree,"); 
  • Pose3D.java

    r137 r151  
    2323 
    2424import org.finroc.core.portdatabase.FinrocTypeInfo; 
    25 import org.finroc.plugins.data_types.Pose3D.Component; 
    2625import org.rrlib.serialization.BinaryInputStream; 
    2726import org.rrlib.serialization.BinaryOutputStream; 
  • PoseTypeAdapter.java

    r143 r151  
    5454    public boolean handlesType(RemoteType remoteType, Info adapterInfo) { 
    5555        if (remoteType.getName().equals(STANDARD_2D_POSE_TYPE_NAME) || remoteType.getName().equals(LEGACY_2D_POSE_TYPE_NAME)) { 
    56             adapterInfo.localType = Pose2D.class; 
     56            adapterInfo.localType = Pose2D.TYPE; 
    5757            adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    5858            return true; 
    5959        } 
    6060        if (remoteType.getName().equals(STANDARD_3D_POSE_TYPE_NAME) || remoteType.getName().equals(LEGACY_3D_POSE_TYPE_NAME) || remoteType.getName().equals(TWIST_3D_TYPE_NAME) || remoteType.getName().equals(LEGACY_TWIST_3D_TYPE_NAME)) { 
    61             adapterInfo.localType = Pose3D.class; 
     61            adapterInfo.localType = Pose3D.TYPE; 
    6262            adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    6363            return true; 
    6464        } 
    6565        if (remoteType.getName().equals(UNCERTAIN_TWIST_2D_TYPE_NAME)) { 
    66             adapterInfo.localType = UncertainPose2D.class; 
     66            adapterInfo.localType = UncertainPose2D.TYPE; 
    6767            adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    6868            return true; 
    6969        } 
    7070        if (remoteType.getName().equals(UNCERTAIN_TWIST_3D_TYPE_NAME)) { 
    71             adapterInfo.localType = UncertainPose3D.class; 
     71            adapterInfo.localType = UncertainPose3D.TYPE; 
    7272            adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    7373            return true; 
  • QuantityTypeAdapter.java

    r134 r151  
    5555                    adapterInfo.customAdapterData1 = SIUnit.getInstance(arguments[0]); 
    5656                    adapterInfo.customAdapterData2 = (arguments[1].trim().equalsIgnoreCase("float")) ? Float.class : Double.class; 
    57                     adapterInfo.localType = CoreNumber.class; 
     57                    adapterInfo.localType = CoreNumber.TYPE; 
    5858                    adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    5959                    if (arguments[1].trim().equalsIgnoreCase("angle") && adapterInfo.customAdapterData1 == SIUnit.HERTZ) { 
     
    6767                adapterInfo.customAdapterData1 = SIUnit.RAD_PER_SECOND; 
    6868                adapterInfo.customAdapterData2 = Double.class; 
    69                 adapterInfo.localType = CoreNumber.class; 
     69                adapterInfo.localType = CoreNumber.TYPE; 
    7070                adapterInfo.networkEncoding = Serialization.DataEncoding.BINARY; 
    7171                return true; 
Note: See TracChangeset for help on using the changeset viewer.