mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/asset/AssetMgrImpl.java
public void syncPosition(final int controllerId, final AssetModel asset)
    {
        final AssetExecuteErrorHandler handler = new AssetExecuteErrorHandler(asset.getName());
        
        final String sensorId = asset.getSensorId();
        final Command.Builder base = Command.newBuilder();
        if (sensorId != null && !sensorId.isEmpty())
        {
            sensorIdUpdate(asset);
            base.setSensorId(sensorId);
        }

        final GetPositionCommandGen.GetPositionCommand getPositionProto = GetPositionCommandGen.
                GetPositionCommand.newBuilder().setBase(base).build();
        
        final ExecuteCommandRequestData executeCommandRequest = ExecuteCommandRequestData.newBuilder().
                setUuid(SharedMessageUtils.convertUUIDToProtoUUID(asset.getUuid())).
                setCommand(getPositionProto.toByteString()).
                setCommandType(CommandTypesGen.CommandType.Enum.GET_POSITION_COMMAND).
                build();
        
        m_MessageFactory.createAssetMessage(AssetMessageType.ExecuteCommandRequest, executeCommandRequest).
            queue(controllerId, handler);
    }
/**
     * Get the position of the asset and sync it to the asset model.
     * @param controllerId
     *      controller id that the asset is on
     * @param asset
     *      asset to get the position of
     */
Get the position of the asset and sync it to the asset model.
@param controllerId
controller id that the asset is on
@param asset
asset to get the position of
Get the position of the asset and sync it to the asset model . @param controllerId controller id that the asset is on @param asset asset to get the position of
public void syncPosition(final int controllerId, final AssetModel asset)
    {
        final AssetExecuteErrorHandler handler = new AssetExecuteErrorHandler(asset.getName());
        final String sensorId = asset.getSensorId();
        final Command.Builder base = Command.newBuilder();
        if (sensorId != null && !sensorId.isEmpty())
        {
            sensorIdUpdate(asset);
            base.setSensorId(sensorId);
        }
        final GetPositionCommandGen.GetPositionCommand getPositionProto = GetPositionCommandGen.
                GetPositionCommand.newBuilder().setBase(base).build();
        final ExecuteCommandRequestData executeCommandRequest = ExecuteCommandRequestData.newBuilder().
                setUuid(SharedMessageUtils.convertUUIDToProtoUUID(asset.getUuid())).
                setCommand(getPositionProto.toByteString()).
                setCommandType(CommandTypesGen.CommandType.Enum.GET_POSITION_COMMAND).
                build();
        m_MessageFactory.createAssetMessage(AssetMessageType.ExecuteCommandRequest, executeCommandRequest).
            queue(controllerId, handler);
    }
public void syncPosition ( final int controllerId , final AssetModel asset ) { final AssetExecuteErrorHandler handler = new AssetExecuteErrorHandler ( asset . getName ( ) ) ; final String sensorId = asset . getSensorId ( ) ; final Command . Builder base = Command . newBuilder ( ) ; if ( sensorId != null && ! sensorId . isEmpty ( ) ) { sensorIdUpdate ( asset ) ; base . setSensorId ( sensorId ) ; } final GetPositionCommandGen . GetPositionCommand getPositionProto = GetPositionCommandGen . GetPositionCommand . newBuilder ( ) . setBase ( base ) . build ( ) ; final ExecuteCommandRequestData executeCommandRequest = ExecuteCommandRequestData . newBuilder ( ) . setUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( asset . getUuid ( ) ) ) . setCommand ( getPositionProto . toByteString ( ) ) . setCommandType ( CommandTypesGen . CommandType . Enum . GET_POSITION_COMMAND ) . build ( ) ; m_MessageFactory . createAssetMessage ( AssetMessageType . ExecuteCommandRequest , executeCommandRequest ) . queue ( controllerId , handler ) ; }
Get the position of the asset and sync it to the asset model.
Get the position of the asset and sync it to the asset model .