Service#
-
class RasterPropMonitor : public krpc::RemoteService#
This service provides the IVA screens, variables and external cameras of Raster Prop Monitor.
Note
A persistent variable is a number a script and the props share: a prop shows it, and a switch or numeric input sets it. Raster Prop Monitor updates the variables that depend on the vessel only for the active vessel.
-
RasterPropMonitor(krpc::Connection &connection)#
Construct an instance of this service.
-
bool available()#
Whether Raster Prop Monitor is installed.
-
Computer computer(SpaceCenter::Part part)#
The computer of a part. Throws an exception if the part has no Raster Prop Monitor computer.
- Parameters:
part – The part.
- Game Scenes:
Flight
-
std::vector<Computer> computers(SpaceCenter::Vessel vessel)#
The computers of the parts of a vessel.
- Parameters:
vessel – The vessel.
- Game Scenes:
Flight
-
std::optional<double> global_persistent_variable(SpaceCenter::Vessel vessel, std::string name)#
The value of a persistent variable of a vessel, or
NULLif it is not set. Throws an exception if the vessel has no Raster Prop Monitor computer.- Parameters:
vessel – The vessel.
name – The name of the variable, without the
PERSISTENT_prefix.
- Game Scenes:
Flight
-
void set_global_persistent_variable(SpaceCenter::Vessel vessel, std::string name, double value)#
Set a persistent variable of a vessel. The props that show it update. Throws an exception if the vessel has no Raster Prop Monitor computer.
- Parameters:
vessel – The vessel.
name – The name of the variable, without the
PERSISTENT_prefix.value – The value.
- Game Scenes:
Flight
-
void remove_global_persistent_variable(SpaceCenter::Vessel vessel, std::string name)#
Remove a persistent variable of a vessel. The props that show it update. Throws an exception if the vessel has no Raster Prop Monitor computer.
- Parameters:
vessel – The vessel.
name – The name of the variable, without the
PERSISTENT_prefix.
- Game Scenes:
Flight
-
krpc::Event global_persistent_variable_changed(SpaceCenter::Vessel vessel, std::string name)#
An event that fires when
global_persistent_variable()changes. The event lasts until it is removed. Throws an exception if the vessel has no Raster Prop Monitor computer.- Parameters:
vessel – The vessel.
name – The name of the variable, without the
PERSISTENT_prefix.
- Game Scenes:
Flight
-
std::vector<Monitor> monitors(SpaceCenter::Vessel vessel)#
The monitors in the IVAs of a vessel’s parts. Throws an exception if the vessel is not the active vessel.
- Parameters:
vessel – The active vessel.
- Game Scenes:
Flight
Note
KSP builds IVAs only for the active vessel.
-
Display display(SpaceCenter::Vessel vessel, std::string name)#
The display of a vessel with the given name, which every page whose
KRPCDisplayhandler names it shows.- Parameters:
vessel – The vessel.
name – The name of the display.
- Game Scenes:
Flight
-
std::vector<ExternalCamera> cameras(SpaceCenter::Vessel vessel)#
The external cameras on a vessel’s parts.
- Parameters:
vessel – The vessel.
- Game Scenes:
Flight
-
RasterPropMonitor(krpc::Connection &connection)#