Show / Hide Table of Contents

Class KiftServiceHandler

Inheritance
System.Object
KiftServiceHandler
Implements
Kift.KiftService.Iface
Kift.KiftService.ISync
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Kift.Server
Assembly: Kift.Server.dll
Syntax
public class KiftServiceHandler : KiftService.Iface, KiftService.ISync

Methods

| Improve this Doc View Source

abort(String, Boolean)

Enable/Disable abort action.

Declaration
public void abort(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == enable, false == disable.

| Improve this Doc View Source

antennaCancelTransmit(Int64)

Cancel data transmission with part ID.

Declaration
public void antennaCancelTransmit(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

antennaDeploy(Int64, Boolean)

Deploy/Retract an antenna with part ID.

Declaration
public void antennaDeploy(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == deploy, false == retract.

| Improve this Doc View Source

antennaTransmit(Int64)

Start data transmission with part ID.

Declaration
public void antennaTransmit(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

cargoBayClose(Int64)

Close a cargo bay with part ID.

Declaration
public void cargoBayClose(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

cargoBayOpen(Int64)

Open a cargo bay with part ID.

Declaration
public void cargoBayOpen(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

clearTarget()

Clear targets.

Declaration
public void clearTarget()
| Improve this Doc View Source

controlSurfaceAuthorityLimiter(Int64, Double)

Set authority limiter of a control surface.

Declaration
public void controlSurfaceAuthorityLimiter(long partId, double authorityLimiter)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double authorityLimiter

The range in which the control surface can move, from -100(full range in reverse direction) to 100(full range).

| Improve this Doc View Source

controlSurfaceDeployed(Int64, Boolean)

Deploy/Undeploy a control surface.

Declaration
public void controlSurfaceDeployed(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == deploy, false == undeploy.

| Improve this Doc View Source

controlSurfaceInverted(Int64, Boolean)

Set a control surface to move in reverse direction.

Declaration
public void controlSurfaceInverted(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == reverted, false == normal.

| Improve this Doc View Source

controlSurfacePitchEnabled(Int64, Boolean)

Enable/Disable pitch of a control surface with part ID.

Declaration
public void controlSurfacePitchEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enable, false == disable.

| Improve this Doc View Source

controlSurfaceRollEnabled(Int64, Boolean)

Enable/Disable roll of a control surface with part ID.

Declaration
public void controlSurfaceRollEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enable, false == disable.

| Improve this Doc View Source

controlSurfaceYawEnabled(Int64, Boolean)

Enable/Disable yaw of a control surface with part ID.

Declaration
public void controlSurfaceYawEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enable, false == disable.

| Improve this Doc View Source

currentVessel()

Returns current vessel's basic info.

Declaration
public Vessel currentVessel()
Returns
Type Description
Kift.Vessel

A Kift.Vessel object which presents current vessel.

| Improve this Doc View Source

currentVesselFullInfo()

Returns current vessel with full info(orbit info).

Declaration
public Vessel currentVesselFullInfo()
Returns
Type Description
Kift.Vessel

A Kift.Vessel object which presents current vessel.

| Improve this Doc View Source

decouplerActivate(Int64)

Activate a decoupler.

Declaration
public void decouplerActivate(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

decreaseTimeWarpRate()

Decrease time warp rate.

Declaration
public void decreaseTimeWarpRate()
| Improve this Doc View Source

dockingPortShieldClose(Int64)

Close the shield of a docking port.

Declaration
public void dockingPortShieldClose(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

dockingPortShieldOpen(Int64)

Open the shield of a docking port.

Declaration
public void dockingPortShieldOpen(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

dockingPortUndock(Int64)

Undock a docking port.

Declaration
public void dockingPortUndock(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

engineActivate(Int64)

Activate an engine.

Declaration
public void engineActivate(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

engineAutoSwitchMode(Int64, Boolean)

Enable/Disable engine Auto-Switch-Mode.

Declaration
public void engineAutoSwitchMode(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enable, false == disable.

| Improve this Doc View Source

engineGimbalLimit(Int64, Double)

Set engine gimbal limit.

Declaration
public void engineGimbalLimit(long partId, double limit)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double limit

Range from 0(locked) to 100(full range).

| Improve this Doc View Source

engineGimbalLock(Int64, Boolean)

Enable/Disable engine gimbal lock.

Declaration
public void engineGimbalLock(long partId, bool locked)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean locked

True == locked, false == unlocked.

| Improve this Doc View Source

engineReverseThrust(Int64, Boolean)

Enable/disable engine reverse thrust.

Declaration
public void engineReverseThrust(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

true=reverse thrust, false=normal.

| Improve this Doc View Source

engineShutDown(Int64)

Shut down an engine.

Declaration
public void engineShutDown(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

engineSwitchMode(Int64, String)

Set engine mode.

Declaration
public void engineSwitchMode(long partId, string mode)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.String mode

Mode name, mode names can be queried from API getVesselPartsById(String, List<Int64>).

| Improve this Doc View Source

engineThrustPercentage(Int64, Int32)

Set engine thrust limit.

Declaration
public void engineThrustPercentage(long partId, int limit)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Int32 limit

Thrust limit, range from 0(cut off) to 100(full throttle).

| Improve this Doc View Source

engineToggleMode(Int64)

Toggle engine mode.

Declaration
public void engineToggleMode(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

fairingJettison(Int64)

Jettison the fairing.

Declaration
public void fairingJettison(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

forward(String, Double)

Command a vessel to move forward in doking mode.

Declaration
public void forward(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(forward) to 1(backward).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

getCelestialBody(String)

Returns the celestial body with specific name. The partIds can be from different vessels.

Declaration
public CelestialBody getCelestialBody(string name)
Parameters
Type Name Description
System.String name

Name of a celestial body. Case sensitive, querying with "Mun" will return corresponding result, while "mun" will not.

Returns
Type Description
Kift.CelestialBody

A Kift.CelestialBody object.

| Improve this Doc View Source

getFlightSceneStartTime()

Declaration
public long getFlightSceneStartTime()
Returns
Type Description
System.Int64
| Improve this Doc View Source

getManeuverNode(String, Double)

Query for a maneuver node at given UT.

Declaration
public ManeuverNode getManeuverNode(string vesselId, double ut)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Double ut

UT at which the maneuver node will be added.

Returns
Type Description
Kift.ManeuverNode

A Kift.ManeuverNode object which presents a maneuver node.

| Improve this Doc View Source

getManeuverNodeInfo()

Returns info about reentry.

Declaration
public GetManeuverNodeInfoResponse getManeuverNodeInfo()
Returns
Type Description
Kift.GetManeuverNodeInfoResponse
| Improve this Doc View Source

getPartAttitudeInfo(Int64)

Returns info about a part's attitude.

Declaration
public AttitudeInfo getPartAttitudeInfo(long partId)
Parameters
Type Name Description
System.Int64 partId

The partId's ID.

Returns
Type Description
Kift.AttitudeInfo

A Kift.AttitudeInfo object which contains part attitude info.

| Improve this Doc View Source

getPartsById(List<Int64>)

Returns a list of parts with specific partIds. The partIds can be from different vessels.

Declaration
public List<Part> getPartsById(List<long> partIds)
Parameters
Type Name Description
System.Collections.Generic.List<System.Int64> partIds

The part IDs.

Returns
Type Description
System.Collections.Generic.List<Kift.Part>

A list of Kift.Part.

| Improve this Doc View Source

getReentryInfo()

Returns info about reentry.

Declaration
public GetReentryInfoResponse getReentryInfo()
Returns
Type Description
Kift.GetReentryInfoResponse
| Improve this Doc View Source

getRunwayLandingInfo(Double, Double, Double, Double, Double)

Returns info about landing to a runway.

Declaration
public GetRunwayLandingInfoResponse getRunwayLandingInfo(double inLong, double inLat, double outLong, double outLat, double altitude)
Parameters
Type Name Description
System.Double inLong

Longitude of runway entry point.

System.Double inLat

Latitude of runway entry point.

System.Double outLong

Longitude of runway exit point.

System.Double outLat

Latitude of runway exit point.

System.Double altitude
Returns
Type Description
Kift.GetRunwayLandingInfoResponse
| Improve this Doc View Source

getTargetBodyOrbitInfo(String, String)

Returns target body's orbit info, and the relationship between specific vessel and target body.

Declaration
public GetTargetBodyOrbitInfoResponse getTargetBodyOrbitInfo(string vesselId, string targetBodyName)
Parameters
Type Name Description
System.String vesselId

The vesselId.

System.String targetBodyName

Case sensitive, the name of target body.

Returns
Type Description
Kift.GetTargetBodyOrbitInfoResponse

A response object with two fields: targetOrbit - a Kift.Orbit object which presents target body's orbit. targetOrbitInfo - a Kift.TargetOrbitInfo object which presents relationships between the two orbits.

| Improve this Doc View Source

getTargetBodyOrbitInfoFromManeuverNode(String, Double, String)

Returns the relationship between target body's orbit and the orbit derived from a vessel's maneuver node. A KiftException is thrown if the maneuver node does not exist.

Declaration
public GetTargetBodyOrbitInfoFromManeuverNodeResponse getTargetBodyOrbitInfoFromManeuverNode(string vesselId, double ut, string targetBodyName)
Parameters
Type Name Description
System.String vesselId

The vesselId.

System.Double ut

The universal time at which there's a maneuver node.

System.String targetBodyName

Case sensitive, the name of target body.

Returns
Type Description
Kift.GetTargetBodyOrbitInfoFromManeuverNodeResponse

A response object with two fields: targetOrbit - a Kift.Orbit object which presents target body's orbit. targetOrbitInfo - a Kift.TargetOrbitInfo object which presents relationships between the two orbits.

| Improve this Doc View Source

getTargetDockingPortInfo()

Declaration
public GetTargetDockingPortInfoResponse getTargetDockingPortInfo()
Returns
Type Description
Kift.GetTargetDockingPortInfoResponse
| Improve this Doc View Source

getTargetVesselOrbitInfo(String, String)

Returns target vessel's orbit info, and the relationship between specific vessel and target vessel.

Declaration
public GetTargetVesselOrbitInfoResponse getTargetVesselOrbitInfo(string vesselId, string targetVesselId)
Parameters
Type Name Description
System.String vesselId

The vesselId.

System.String targetVesselId

The target vessel's ID.

Returns
Type Description
Kift.GetTargetVesselOrbitInfoResponse

A response object with two fields: targetOrbit - a Kift.Orbit object which presents target vessel's orbit. targetOrbitInfo - a Kift.TargetOrbitInfo object which presents relationships between the two orbits.

| Improve this Doc View Source

getTargetVesselOrbitInfoFromManeuverNode(String, Double, String)

Returns the relationship between target vessel's orbit and the orbit derived from a vessel's maneuver node. A KiftException is thrown if the maneuver node does not exist.

Declaration
public GetTargetVesselOrbitInfoFromManeuverNodeResponse getTargetVesselOrbitInfoFromManeuverNode(string vesselId, double ut, string targetVesselId)
Parameters
Type Name Description
System.String vesselId

The vesselId.

System.Double ut

The universal time at which there's a maneuver node.

System.String targetVesselId

The target vessel's ID.

Returns
Type Description
Kift.GetTargetVesselOrbitInfoFromManeuverNodeResponse

A response object with two fields: targetOrbit - a Kift.Orbit object which presents target vessel's orbit. targetOrbitInfo - a Kift.TargetOrbitInfo object which presents relationships between the two orbits.

| Improve this Doc View Source

getTimeWarpRate()

Get current timewarp rate.

Declaration
public int getTimeWarpRate()
Returns
Type Description
System.Int32

Current timewarp rate.

| Improve this Doc View Source

getVerticalLandingInfo()

Returns info about vertical landing.

Declaration
public GetVerticalLandingInfoResponse getVerticalLandingInfo()
Returns
Type Description
Kift.GetVerticalLandingInfoResponse
| Improve this Doc View Source

getVessel(String)

Returns the vessel with specific vesselId.

Declaration
public Vessel getVessel(string vesselId)
Parameters
Type Name Description
System.String vesselId

The vesselId.

Returns
Type Description
Kift.Vessel

A Kift.Vessel object.

| Improve this Doc View Source

getVesselAttitudeInfo(String)

Returns info about a vessel's attitude.

Declaration
public AttitudeInfo getVesselAttitudeInfo(string vesselId)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

Returns
Type Description
Kift.AttitudeInfo

A Kift.AttitudeInfo object which contains vessel attitude info.

| Improve this Doc View Source

getVesselParts(String)

Returns a list of a vessel's parts .

Declaration
public List<Part> getVesselParts(string vesselId)
Parameters
Type Name Description
System.String vesselId

The vesselId.

Returns
Type Description
System.Collections.Generic.List<Kift.Part>

A list of Kift.Part.

| Improve this Doc View Source

getVesselPartsById(String, List<Int64>)

Returns a list of parts, with specific partIds and vesselId. If any partId doesn't exist or belong to that vessel, it won't be in the returned list.

Declaration
public List<Part> getVesselPartsById(string vesselId, List<long> partIds)
Parameters
Type Name Description
System.String vesselId

The vesselId.

System.Collections.Generic.List<System.Int64> partIds

The IDs of parts from vessel.

Returns
Type Description
System.Collections.Generic.List<Kift.Part>

A list of Kift.Part.

| Improve this Doc View Source

getVesselPartsByType(String, PartType)

Returns a list of parts, with specific Kift.PartType.

Declaration
public List<Part> getVesselPartsByType(string vesselId, PartType type)
Parameters
Type Name Description
System.String vesselId

The vesselId.

Kift.PartType type

The part type to be queried.

Returns
Type Description
System.Collections.Generic.List<Kift.Part>

A list of Kift.Part.

| Improve this Doc View Source

getVesselPartsByTypes(String, List<PartType>)

Returns a list of parts, filtered by a list of Kift.PartType.

Declaration
public List<Part> getVesselPartsByTypes(string vesselId, List<PartType> types)
Parameters
Type Name Description
System.String vesselId

The vesselId.

System.Collections.Generic.List<Kift.PartType> types
Returns
Type Description
System.Collections.Generic.List<Kift.Part>

A list of Kift.Part.

| Improve this Doc View Source

increaseTimeWarpRate()

Increase time warp rate.

Declaration
public void increaseTimeWarpRate()
| Improve this Doc View Source

intakeClose(Int64)

Close the air intake.

Declaration
public void intakeClose(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

intakeOpen(Int64)

Open the air intake.

Declaration
public void intakeOpen(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

launchClampRelease(Int64)

Release the launch clamp.

Declaration
public void launchClampRelease(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

legExtend(Int64)

Extend a leg.

Declaration
public void legExtend(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

legRetract(Int64)

Retract a leg.

Declaration
public void legRetract(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

lightOff(Int64)

Turn off the light.

Declaration
public void lightOff(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

lightOn(Int64)

Turn on the light.

Declaration
public void lightOn(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

listCelestialBody()

Returns a list of all the celestial bodies in current game.

Declaration
public List<CelestialBody> listCelestialBody()
Returns
Type Description
System.Collections.Generic.List<Kift.CelestialBody>

A list of Kift.CelestialBody.

| Improve this Doc View Source

listLoadedVessel()

Returns all the loaded vessels in current game.

Declaration
public List<Vessel> listLoadedVessel()
Returns
Type Description
System.Collections.Generic.List<Kift.Vessel>

A list of Kift.Vessel.

| Improve this Doc View Source

listManeuverNodes(String)

Get a list of maneuver nodes of a vessel.

Declaration
public List<ManeuverNode> listManeuverNodes(string vesselId)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

Returns
Type Description
System.Collections.Generic.List<Kift.ManeuverNode>

A Kift.ManeuverNode list which contains maneuver nodes.

| Improve this Doc View Source

listVessel()

Returns all the vessels in current game.

Declaration
public List<Vessel> listVessel()
Returns
Type Description
System.Collections.Generic.List<Kift.Vessel>

A list of Kift.Vessel.

| Improve this Doc View Source

parachuteCut(Int64)

Cut the parachute.

Declaration
public void parachuteCut(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

parachuteDeploy(Int64)

Deploy the parachute.

Declaration
public void parachuteDeploy(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

parachuteDeployAltitude(Int64, Double)

Set deloy altitude of a parachute, in meters.

Declaration
public void parachuteDeployAltitude(long partId, double altitude)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double altitude

Deploy altitude, in meters.

| Improve this Doc View Source

parachuteDisarm(Int64)

Disarm the parachute.

Declaration
public void parachuteDisarm(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

parachuteMinPressure(Int64, Double)

Set the minimum deloy pressure at which the parachute will semi-deploy, in atmospheres.

Declaration
public void parachuteMinPressure(long partId, double pressure)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double pressure

Minimum deloy pressure, in atmospheres, for example, 0.3 .

| Improve this Doc View Source

ping()

Declaration
public void ping()
| Improve this Doc View Source

pitch(String, Double)

Pitch a vessel.

Declaration
public void pitch(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(nose down) to 1(nose up).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

radiatorActivate(Int64)

Activate a radiator.

Declaration
public void radiatorActivate(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

radiatorDeactivate(Int64)

Deactivate a radiator.

Declaration
public void radiatorDeactivate(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

radiatorExtend(Int64)

Extend a radiator.

Declaration
public void radiatorExtend(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

radiatorRetract(Int64)

Retract a radiator.

Declaration
public void radiatorRetract(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

RCSEnabled(Int64, Boolean)

Enable/Disable RCS.

Declaration
public void RCSEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

RCSForwardEnabled(Int64, Boolean)

Enable/Disable RCS forward.

Declaration
public void RCSForwardEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

RCSPitchEnabled(Int64, Boolean)

Enable/Disable RCS pitch.

Declaration
public void RCSPitchEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

RCSRightEnabled(Int64, Boolean)

Enable/Disable RCS right.

Declaration
public void RCSRightEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

RCSRollEnabled(Int64, Boolean)

Enable/Disable RCS roll.

Declaration
public void RCSRollEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

RCSThrustPercentage(Int64, Int32)

Set RCS thrust limit.

Declaration
public void RCSThrustPercentage(long partId, int limit)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Int32 limit

Range from 0(disabled) to 100(full throttle).

| Improve this Doc View Source

RCSUpEnabled(Int64, Boolean)

Enable/Disable RCS up.

Declaration
public void RCSUpEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

RCSYawEnabled(Int64, Boolean)

Enable/Disable RCS yaw.

Declaration
public void RCSYawEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

reactionWheelEnabled(Int64, Boolean)

Enable/Disable a reaction wheel.

Declaration
public void reactionWheelEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

releaseControl(String)

Release vessel control, reset vessel control input to 0, then manual input is available.

Declaration
public void releaseControl(string vesselId)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

| Improve this Doc View Source

removeManeuverNode(String, Double)

Remove the maneuver node at given UT.

Declaration
public void removeManeuverNode(string vesselId, double ut)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Double ut

Universal time, the maneuver node at given UT will be removed.

| Improve this Doc View Source

resetControl(String)

Reset vessel control input(pitch/yaw/roll/up/left/forward) to 0, manual input is overwritten.

Declaration
public void resetControl(string vesselId)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

| Improve this Doc View Source

resourceConverterStart(Int64, Int32)

Start the resource converter with index. Get the resource converter list from Kift.Part.ResourceConverter.

Declaration
public void resourceConverterStart(long partId, int index)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Int32 index

The converter index.

| Improve this Doc View Source

resourceConverterStop(Int64, Int32)

Stop the resource converter with index. Get the resource converter list from Kift.Part.ResourceConverter.

Declaration
public void resourceConverterStop(long partId, int index)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Int32 index

The converter index.

| Improve this Doc View Source

resourceHarvesterDeploy(Int64)

Deploy a resource harvester.

Declaration
public void resourceHarvesterDeploy(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

resourceHarvesterRetract(Int64)

Retract a resource harvester.

Declaration
public void resourceHarvesterRetract(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

resourceHarvesterStart(Int64)

Start a resource harvester.

Declaration
public void resourceHarvesterStart(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

resourceHarvesterStop(Int64)

Stop a resource harvester.

Declaration
public void resourceHarvesterStop(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

right(String, Double)

Command a vessel to move right in doking mode.

Declaration
public void right(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(left) to 1(right).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

roll(String, Double)

Roll a vessel.

Declaration
public void roll(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(anticlockwise) to 1(clockwise).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

sensorActivate(Int64)

Activate a sensor.

Declaration
public void sensorActivate(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

sensorDeactivate(Int64)

Deactivate a sensor.

Declaration
public void sensorDeactivate(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

setActionGroup(String, Int32, Boolean)

Enable/Disable action group with groupId.

Declaration
public void setActionGroup(string vesselId, int groupId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Int32 groupId

Action group ID.

System.Boolean enabled

True == enable, false == disable.

| Improve this Doc View Source

setAntennas(String, Boolean)

Deploy/Retract antennas.

Declaration
public void setAntennas(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy, false == retract.

| Improve this Doc View Source

setBrakes(String, Boolean)

Engage/Disengage brakes.

Declaration
public void setBrakes(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == engage.

| Improve this Doc View Source

setCameraFocussedVessel(String)

Focus the camera on a vessel.

Declaration
public void setCameraFocussedVessel(string vesselId)
Parameters
Type Name Description
System.String vesselId

Set the camera focused on given vessel.

| Improve this Doc View Source

setCameraMode(CameraMode)

Focus the camera on a vessel.

Declaration
public void setCameraMode(CameraMode mode)
Parameters
Type Name Description
Kift.CameraMode mode
| Improve this Doc View Source

setCargoBays(String, Boolean)

Open/Close cargo bays.

Declaration
public void setCargoBays(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == open, false == close.

| Improve this Doc View Source

setControlFrom(String, Int64)

Control from the Part with specific Id.

Declaration
public void setControlFrom(string vesselId, long partId)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Int64 partId

Id of the Part from which the vessel is controlled.

| Improve this Doc View Source

setGear(String, Boolean)

Deploy/Retract gears, including landing legs, deployable wheels.

Declaration
public void setGear(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy.

| Improve this Doc View Source

setIntakes(String, Boolean)

Open/Close air intakes.

Declaration
public void setIntakes(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == open, false == close.

| Improve this Doc View Source

setLegs(String, Boolean)

Deploy/Retract legs.

Declaration
public void setLegs(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy.

| Improve this Doc View Source

setLights(String, Boolean)

Turn on/off lights.

Declaration
public void setLights(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == on.

| Improve this Doc View Source

setManeuverNode(String, Double, Double, Double, Double)

Create a maneuver node at given UT for a vessel. If there is already a maneuver node at that UT, it'll be deleted first.

Declaration
public ManeuverNode setManeuverNode(string vesselId, double ut, double prograde, double normal, double radial)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Double ut

UT at which the maneuver node will be added.

System.Double prograde

DeltaV in prograde direction, in m/s.

System.Double normal

DeltaV in nomal direction, in m/s.

System.Double radial

DeltaV in radial direction, in m/s.

Returns
Type Description
Kift.ManeuverNode

A Kift.ManeuverNode object which presents the created maneuver node.

| Improve this Doc View Source

setParachutes(String, Boolean)

Deploy/Undeploy parachutes.

Declaration
public void setParachutes(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy, false == undeploy.

| Improve this Doc View Source

setRadiators(String, Boolean)

Deploy/Retract radiators.

Declaration
public void setRadiators(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy, false == retract.

| Improve this Doc View Source

setRCS(String, Boolean)

Enable/Disable RCS.

Declaration
public void setRCS(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == enable.

| Improve this Doc View Source

setReactionWheels(String, Boolean)

Enable/Disable reaction wheels.

Declaration
public void setReactionWheels(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == enable.

| Improve this Doc View Source

setResourceHarvestersActive(String, Boolean)

Activate/Deactivate resource harvesters.

Declaration
public void setResourceHarvestersActive(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == activate, false == deactivate.

| Improve this Doc View Source

setResourceHarvestersDeploy(String, Boolean)

Deploy/Retract resource harvesters.

Declaration
public void setResourceHarvestersDeploy(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy, false == retract.

| Improve this Doc View Source

setSAS(String, Boolean)

Enable/Disable SAS.

Declaration
public void setSAS(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == enable.

| Improve this Doc View Source

setSASMode(String, SASMode)

Set vessel's SAS mode.

Declaration
public void setSASMode(string vesselId, SASMode sasMode)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

Kift.SASMode sasMode

Available modes:
StabilityAssist, Prograde, Retrograde, Normal, Antinormal, RadialIn, RadialOut, Target, AntiTarget, Maneuver.

| Improve this Doc View Source

setSolarPanels(String, Boolean)

Deploy/Retract solar panels.

Declaration
public void setSolarPanels(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy, false == retract.

| Improve this Doc View Source

setWheels(String, Boolean)

Deploy/Retract wheels, if deployable.

Declaration
public void setWheels(string vesselId, bool enabled)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Boolean enabled

True == deploy.

| Improve this Doc View Source

snapshot(SnapshotRequest)

Monitor vessel data in real time, for example, altitude, pitch angle, speed, etc.

Declaration
public SnapshotResponse snapshot(SnapshotRequest snapshotRequest)
Parameters
Type Name Description
Kift.SnapshotRequest snapshotRequest

The ID of the vessel you want to monitor, and the keys of data to be monitored. The keys are devided into 4 categories: Vessel, Flight, Orbit, Part.

Returns
Type Description
Kift.SnapshotResponse

A Kift.SnapshotResponse object which contains the data monitored.

Remarks

Achieved by making requests continuously from the client, because Thrift v0.12.0 doesn't support streaming. I tried to use GRPC at first, but it appears that GRPC requires .NET Framework 4.5+, and unfortunately, KSP is built on .NET Framework 3.5 .

Examples
// Monitor current vessel's orbit apoapsis, surface speed, total mass and engine throttle percentage in C#.
KiftService.Client client = new Client("localhost", 9090).Connect(); // connect to server
Vessel currentVessel = client.currentVessel(); // get current vessel
VesselObservor vo = new VesselObservor(currentVessel.Id, client); // VesselObservor is from KiftClient.CSharp
vo.WatchVessel(OVessel.Mass);
vo.WatchOrbit(OOrbit.Apoapsis);
vo.WatchFlight(OFlight.SurfaceSpeed);
List <Part>  engines = client.getVesselPartsByType(currentVessel.Id, PartType.Engine); // get the engine part
long engineId = engines[0].id;
vo.WatchPart(engineId, OPart.EngineThrottle);

// VesselObservor provides two ways to fetch data from the game:
// 1, fetch once, then the data won't be updated until the next "Capture()" action is done.
vo.Capture(); // send a request to server, and update the data held by VesselObservor
double mass = vo.Snapshot.Vessel.mass; // get current total mass
double apoapsis = vo.Snapshot.Orbit.apoapsis; // get current orbit apoapsis
double surfaceSpeed = vo.Snapshot.Flight.surfaceSpeed; // get current surface speed
double throttle = vo.Snapshot.Parts[engineId].Engine.throttle; // get current engine throttle level

// 2, update automatically, with an interval(in milliseconds).
vo.SyncInterval = 200; // send a request every 200 milliseconds, and update the data held by VesselObservor
vo.StartStream(); // start the loop
...
double mass = vo.Snapshot.Vessel.mass; // data held by VesselObservor is always up to date.
...
vo.StopStream(); // stop the loop
| Improve this Doc View Source

solarPanelExtend(Int64)

Extend a solar panel.

Declaration
public void solarPanelExtend(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

solarPanelRetract(Int64)

Retract a solar panel.

Declaration
public void solarPanelRetract(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

stage()

Activate the next stage.

Declaration
public void stage()
| Improve this Doc View Source

switchActiveVessel(String)

Declaration
public void switchActiveVessel(string vesselId)
Parameters
Type Name Description
System.String vesselId
| Improve this Doc View Source

targetCelestialBody(String, String)

Set vessel's target to a celestial body.

Declaration
public void targetCelestialBody(string vesselId, string targetName)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.String targetName

Case sensitive, name of target celestial body.

| Improve this Doc View Source

targetDockingPort(String, Int64)

Set vessel's target to a docking port.

Declaration
public void targetDockingPort(string vesselId, long dockingPortId)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Int64 dockingPortId

The target docking port's ID.

| Improve this Doc View Source

targetVessel(String, String)

Set vessel's target to another vessel.

Declaration
public void targetVessel(string vesselId, string targetVesselId)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.String targetVesselId

The target vessel's ID.

| Improve this Doc View Source

throttle(String, Double)

Set vessel's main engine throttle rate.

Declaration
public void throttle(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Main engine throttle rate, from 0(0%) to 1(100%).

| Improve this Doc View Source

toggleActionGroup(String, Int32)

Toggle action group state with groupId.

Declaration
public void toggleActionGroup(string vesselId, int groupId)
Parameters
Type Name Description
System.String vesselId

The vessel's ID.

System.Int32 groupId

Action group ID.

| Improve this Doc View Source

universalTime()

Get current universal time in game.

Declaration
public double universalTime()
Returns
Type Description
System.Double

Current universal time in game.

| Improve this Doc View Source

up(String, Double)

Command a vessel to move up in doking mode.

Declaration
public void up(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(up) to 1(down).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

warpTo(Double)

Timewarp to universal time "ut".

Declaration
public void warpTo(double ut)
Parameters
Type Name Description
System.Double ut

The target universal time.

| Improve this Doc View Source

wheelAutoFrictionControlEnabled(Int64, Boolean)

Enable/Disable wheel auto friction control.

Declaration
public void wheelAutoFrictionControlEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

wheelBrakeEngage(Int64)

Engage the brake of a wheel.

Declaration
public void wheelBrakeEngage(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

wheelBrakeForce(Int64, Double)

Set wheel brake's force in percentage.

Declaration
public void wheelBrakeForce(long partId, double percentage)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double percentage

Range from 0 to 100.

| Improve this Doc View Source

wheelBrakeRelease(Int64)

Release the brake of a wheel.

Declaration
public void wheelBrakeRelease(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

wheelDeploy(Int64)

Deploy a wheel, if the wheel is deployable.

Declaration
public void wheelDeploy(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

wheelDriveLimiter(Int64, Double)

Set motor drive limiter, if traction control is disabled.

Declaration
public void wheelDriveLimiter(long partId, double limit)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double limit
| Improve this Doc View Source

wheelManualFrictionControl(Int64, Double)

Set wheel friction control manually, if auto friction control is disabled.

Declaration
public void wheelManualFrictionControl(long partId, double value)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double value

Range from 0 to 5.

| Improve this Doc View Source

wheelMotorEnabled(Int64, Boolean)

Enable/Disable wheel traction control.

Declaration
public void wheelMotorEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

wheelMotorInverted(Int64, Boolean)

Set a wheel running in reverse direction(roll backwards when the forward key is pressed).

Declaration
public void wheelMotorInverted(long partId, bool inverted)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean inverted

True == inverted, false == normal.

| Improve this Doc View Source

wheelRetract(Int64)

Deploy a wheel, if the wheel is deployable.

Declaration
public void wheelRetract(long partId)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

| Improve this Doc View Source

wheelSteer(String, Double)

Steer the wheels with a throttle rate.

Declaration
public void wheelSteer(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(steer left) to 1(steer right).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

wheelSteeringEnabled(Int64, Boolean)

Enable/Disable wheel steering.

Declaration
public void wheelSteeringEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled
| Improve this Doc View Source

wheelSteeringInverted(Int64, Boolean)

Set a wheel steering in reverse direction(turn left when the right key is pressed).

Declaration
public void wheelSteeringInverted(long partId, bool inverted)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean inverted

True == inverted, false == normal.

| Improve this Doc View Source

wheelThrottle(String, Double)

Set wheel motor throttle rate.

Declaration
public void wheelThrottle(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(move backword) to 1(move forward).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

| Improve this Doc View Source

wheelTractionControl(Int64, Double)

Set wheel traction control.

Declaration
public void wheelTractionControl(long partId, double value)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Double value

Range from 0 to 5.

| Improve this Doc View Source

wheelTractionControlEnabled(Int64, Boolean)

Enable/Disable wheel traction control.

Declaration
public void wheelTractionControlEnabled(long partId, bool enabled)
Parameters
Type Name Description
System.Int64 partId

The part's ID.

System.Boolean enabled

True == enabled, false == disabled.

| Improve this Doc View Source

yaw(String, Double)

Yaw a vessel.

Declaration
public void yaw(string vesselId, double value)
Parameters
Type Name Description
System.String vesselId

The controlled vessel's ID.

System.Double value

Throttle rate, from -1(left) to 1(right).

Remarks

Controling a vessel via API will overwrite related control input from game, for example, SAS. call resetControl(String) to release control, then the vessel can be controlled by game input again.

Implements

Kift.KiftService.Iface
Kift.KiftService.ISync
  • Improve this Doc
  • View Source
Back to top Copyright © 2019 Zhang Xiao