Computer#
Computer
The Raster Prop Monitor computer of a part, which holds the variables its props show.
Obtained by calling POST /raster-prop-monitor/computer or
POST /raster-prop-monitor/computers.
A Computer object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /raster-prop-monitor/computer/(id)/part#
The part the computer is on.
- Parameters:
id – The identifier of the Computer object.
- Response JSON Object:
value (SpaceCenter.Part)
- POST /raster-prop-monitor/computer/(id)/persistent-variable#
The value of a persistent variable of the part, or else of the vessel, or
nullif neither is set. Props read it asPERSISTENT_name.- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
name (string) – The name of the variable, without the
PERSISTENT_prefix.
- Response JSON Object:
value (double?)
- POST /raster-prop-monitor/computer/(id)/set-persistent-variable#
Set a persistent variable of the part. The props that show it update.
- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
name (string) – The name of the variable, without the
PERSISTENT_prefix.value (double) – The value.
- POST /raster-prop-monitor/computer/(id)/remove-persistent-variable#
Remove a persistent variable of the part. The props that show it update.
- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
name (string) – The name of the variable, without the
PERSISTENT_prefix.
- POST /raster-prop-monitor/computer/(id)/variable-type#
The type of a variable’s current value. Throws an exception if Raster Prop Monitor does not recognize the variable.
- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
name (string) – The name of the variable, e.g.
ALTITUDE.
- Response JSON Object:
value (RasterPropMonitor.VariableType)
- POST /raster-prop-monitor/computer/(id)/number-variable#
The value of a number variable. Raster Prop Monitor gives a boolean as 0 or 1. Throws an exception if Raster Prop Monitor does not recognize the variable, or its value is a string.
- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
name (string) – The name of the variable, e.g.
ALTITUDE.
- Response JSON Object:
value (double)
- POST /raster-prop-monitor/computer/(id)/string-variable#
The value of a variable as a string. A number gives its invariant culture string. Throws an exception if Raster Prop Monitor does not recognize the variable.
- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
name (string) – The name of the variable, e.g.
ALTITUDE.
- Response JSON Object:
value (string)
- POST /raster-prop-monitor/computer/(id)/format-variables#
Text with its variables formatted as a monitor page formats them, e.g.
{0:SIP6.1}m $&$ ALTITUDE. Each line takes its own variables. Throws an exception if Raster Prop Monitor does not recognize a variable, or a format is invalid.- Parameters:
id – The identifier of the Computer object.
- Request JSON Object:
text (string) – The text, in the format of a monitor page.
- Response JSON Object:
value (string)
VariableType
The type of a Raster Prop Monitor variable. See POST /raster-prop-monitor/computer/(id)/variable-type.
Passed and returned as the name of one of its values:
"number"A number. Access using
POST /raster-prop-monitor/computer/(id)/number-variable."string"A string. Access using
POST /raster-prop-monitor/computer/(id)/string-variable.