• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SubscribeVehicleDataResponse类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse的典型用法代码示例。如果您正苦于以下问题:Java SubscribeVehicleDataResponse类的具体用法?Java SubscribeVehicleDataResponse怎么用?Java SubscribeVehicleDataResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

SubscribeVehicleDataResponse类属于com.smartdevicelink.proxy.rpc包,在下文中一共展示了SubscribeVehicleDataResponse类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onSubscribeVehicleDataResponse

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
/**
 * Rest of the SDL callbacks from the head unit
 */

@Override
public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response) {
	if(response.getSuccess()){
		Log.i(TAG, "Subscribed to vehicle data");
		this.isVehicleDataSubscribed = true;
	}
}
 

开发者ID:smartdevicelink,
项目名称:hello_sdl_android,
代码行数:12,
代码来源:SdlService.java

示例2: createMessage

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
@Override
protected RPCMessage createMessage() {
	SubscribeVehicleDataResponse msg = new SubscribeVehicleDataResponse();

	msg.setSpeed(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_SPEED.ordinal()));
	msg.setRpm(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_RPM.ordinal()));
	msg.setExternalTemperature(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_EXTERNTEMP.ordinal()));
	msg.setFuelLevel(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELLEVEL.ordinal()));
	msg.setPrndl(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_PRNDL.ordinal()));
	msg.setTirePressure(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TIREPRESSURE.ordinal()));
	msg.setEngineTorque(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ENGINETORQUE.ordinal()));
	msg.setOdometer(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ODOMETER.ordinal()));
	msg.setGps(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GPS.ordinal()));
	msg.setFuelLevelState(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE.ordinal()));
	msg.setInstantFuelConsumption(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELCONSUMPTION.ordinal()));
	msg.setBeltStatus(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BELTSTATUS.ordinal()));
	msg.setBodyInformation(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BODYINFO.ordinal()));
	msg.setDeviceStatus(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_DEVICESTATUS.ordinal()));
	msg.setDriverBraking(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BRAKING.ordinal()));
	msg.setWiperStatus(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WIPERSTATUS.ordinal()));
	msg.setHeadLampStatus(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS.ordinal()));
	msg.setAccPedalPosition(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ACCPEDAL.ordinal()));
	msg.setSteeringWheelAngle(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_STEERINGWHEEL.ordinal()));
	msg.setECallInfo(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ECALLINFO.ordinal()));
	msg.setAirbagStatus(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_AIRBAGSTATUS.ordinal()));
	msg.setEmergencyEvent(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_EMERGENCYEVENT.ordinal()));
	msg.setClusterModeStatus(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS.ordinal()));
	msg.setMyKey(Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_MYKEY.ordinal()));

	return msg;
}
 

开发者ID:smartdevicelink,
项目名称:sdl_android,
代码行数:32,
代码来源:SubscribeVehicleDataResponseTest.java

示例3: getExpectedParameters

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
@Override
protected JSONObject getExpectedParameters(int sdlVersion) {
	JSONObject result = new JSONObject();
	
       try {
       	
       	// Note: If the key values stored in SubscribeVehicleDataResponse
       	// were to be in a list then this could be easily looped through
       	// instead of individually set.
       	
		result.put(SubscribeVehicleDataResponse.KEY_SPEED, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_SPEED.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_RPM, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_RPM.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_EXTERNAL_TEMPERATURE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_EXTERNTEMP.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_FUEL_LEVEL, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELLEVEL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_PRNDL, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_PRNDL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_TIRE_PRESSURE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TIREPRESSURE.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_ENGINE_TORQUE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ENGINETORQUE.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_ODOMETER, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ODOMETER.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_GPS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GPS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_FUEL_LEVEL_STATE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_INSTANT_FUEL_CONSUMPTION, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELCONSUMPTION.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_BELT_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BELTSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_BODY_INFORMATION, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BODYINFO.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_DEVICE_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_DEVICESTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_DRIVER_BRAKING, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BRAKING.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_WIPER_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WIPERSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_HEAD_LAMP_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_ACC_PEDAL_POSITION, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ACCPEDAL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_STEERING_WHEEL_ANGLE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_STEERINGWHEEL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_E_CALL_INFO, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ECALLINFO.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_AIRBAG_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_AIRBAGSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_EMERGENCY_EVENT, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_EMERGENCYEVENT.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_CLUSTER_MODE_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_MY_KEY, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_MYKEY.ordinal()).serializeJSON());
	} catch (JSONException e) {
		fail(Test.JSON_FAIL);
	}

	return result;
}
 

开发者ID:smartdevicelink,
项目名称:sdl_android,
代码行数:41,
代码来源:SubscribeVehicleDataResponseTest.java

示例4: getExpectedParameters

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
@Override
protected JSONObject getExpectedParameters(int sdlVersion) {
	JSONObject result = new JSONObject();
	
       try {

       	// Note: If the key values stored in SubscribeVehicleDataResponse
       	// were to be in a list then this could be easily looped through
       	// instead of individually set.
       	
		result.put(SubscribeVehicleDataResponse.KEY_SPEED, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_SPEED.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_RPM, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_RPM.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_EXTERNAL_TEMPERATURE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_EXTERNTEMP.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_FUEL_LEVEL, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELLEVEL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_PRNDL, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_PRNDL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_TIRE_PRESSURE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TIREPRESSURE.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_ENGINE_TORQUE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ENGINETORQUE.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_ODOMETER, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ODOMETER.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_GPS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GPS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_FUEL_LEVEL_STATE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_INSTANT_FUEL_CONSUMPTION, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELCONSUMPTION.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_BELT_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BELTSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_BODY_INFORMATION, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BODYINFO.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_DEVICE_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_DEVICESTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_DRIVER_BRAKING, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_BRAKING.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_WIPER_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WIPERSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_HEAD_LAMP_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_ACC_PEDAL_POSITION, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ACCPEDAL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_STEERING_WHEEL_ANGLE, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_STEERINGWHEEL.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_E_CALL_INFO, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ECALLINFO.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_AIRBAG_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_AIRBAGSTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_EMERGENCY_EVENT, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_EMERGENCYEVENT.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_CLUSTER_MODE_STATUS, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS.ordinal()).serializeJSON());
        result.put(SubscribeVehicleDataResponse.KEY_MY_KEY, Test.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_MYKEY.ordinal()).serializeJSON());
	} catch (JSONException e) {
		fail(Test.JSON_FAIL);
	}

	return result;
}
 

开发者ID:smartdevicelink,
项目名称:sdl_android,
代码行数:41,
代码来源:UnsubscribeVehicleDataResponseTest.java

示例5: onSubscribeVehicleDataResponse

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
@Override
public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response) {
    if(response.getSuccess()){
        Log.i(TAG, "Subscribed to vehicle data");
    }
}
 

开发者ID:livio,
项目名称:sdl_video_streaming_android_sample,
代码行数:7,
代码来源:SdlService.java

示例6: onSubscribeVehicleDataResponse

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
@Override
public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response) {
	// TODO Auto-generated method stub

}
 

开发者ID:smartdevicelink,
项目名称:sdl_mobileweather_tutorial_android,
代码行数:6,
代码来源:SmartDeviceLinkService.java

示例7: onSubscribeVehicleDataResponse

点赞 2

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
@Override
public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response) {
}
 

开发者ID:smartdevicelink,
项目名称:sdl_android,
代码行数:4,
代码来源:SdlProxyBaseTests.java

示例8: onSubscribeVehicleDataResponse

点赞 1

import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; //导入依赖的package包/类
public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response); 

开发者ID:smartdevicelink,
项目名称:sdl_android,
代码行数:2,
代码来源:IProxyListenerBase.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)