.. default-domain:: c .. highlight:: c Communications ============== .. type:: krpc_SpaceCenter_Comms_t Used to interact with CommNet for a given vessel. Obtained by calling :func:`krpc_SpaceCenter_Vessel_Comms`. .. macro:: KRPC_CLASS_SPACECENTER_COMMS The service and class ids of the class, for :func:`krpc_KRPC_Type_ClassTypeById`. .. function:: krpc_error_t krpc_SpaceCenter_Comms_CanCommunicate(krpc_connection_t connection, bool * returnValue, krpc_SpaceCenter_Comms_t instance) Whether the vessel can communicate with KSC. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Comms_CanTransmitScience(krpc_connection_t connection, bool * returnValue, krpc_SpaceCenter_Comms_t instance) Whether the vessel can transmit science data to KSC. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Comms_SignalStrength(krpc_connection_t connection, double * returnValue, krpc_SpaceCenter_Comms_t instance) Signal strength to KSC. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Comms_SignalDelay(krpc_connection_t connection, double * returnValue, krpc_SpaceCenter_Comms_t instance) Signal delay to KSC in seconds. :Game Scenes: Flight .. function:: krpc_error_t krpc_SpaceCenter_Comms_Power(krpc_connection_t connection, double * returnValue, krpc_SpaceCenter_Comms_t instance) The combined power of all active antennae on the vessel. :Game Scenes: Flight .. note:: Not used by RealAntennas, which replaces the stock range model. .. function:: krpc_error_t krpc_SpaceCenter_Comms_ControlPath(krpc_connection_t connection, krpc_list_object_t * returnValue, krpc_SpaceCenter_Comms_t instance) The communication path used to control the vessel. :Game Scenes: Flight .. type:: krpc_SpaceCenter_CommLink_t Represents a communication link between two nodes in the network. .. macro:: KRPC_CLASS_SPACECENTER_COMMLINK The service and class ids of the class, for :func:`krpc_KRPC_Type_ClassTypeById`. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_Type(krpc_connection_t connection, krpc_SpaceCenter_CommLinkType_t * returnValue, krpc_SpaceCenter_CommLink_t instance) The type of link. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_SignalStrength(krpc_connection_t connection, double * returnValue, krpc_SpaceCenter_CommLink_t instance) Signal strength of the link. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_Start(krpc_connection_t connection, krpc_SpaceCenter_CommNode_t * returnValue, krpc_SpaceCenter_CommLink_t instance) Start point of the link. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_End(krpc_connection_t connection, krpc_SpaceCenter_CommNode_t * returnValue, krpc_SpaceCenter_CommLink_t instance) End point of the link. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_ForwardDataRate(krpc_connection_t connection, double * returnValue, krpc_SpaceCenter_CommLink_t instance) The data rate from :func:`krpc_SpaceCenter_CommLink_Start` to :func:`krpc_SpaceCenter_CommLink_End`, in bits per second. .. note:: Requires RealAntennas. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_ReverseDataRate(krpc_connection_t connection, double * returnValue, krpc_SpaceCenter_CommLink_t instance) The data rate from :func:`krpc_SpaceCenter_CommLink_End` to :func:`krpc_SpaceCenter_CommLink_Start`, in bits per second. .. note:: Requires RealAntennas. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_StartAntenna(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t * returnValue, krpc_SpaceCenter_CommLink_t instance) The antenna at :func:`krpc_SpaceCenter_CommLink_Start` that transmits over the link, or ``nullptr`` if :func:`krpc_SpaceCenter_CommLink_Start` is a ground station or an unloaded vessel. .. note:: Requires RealAntennas. .. function:: krpc_error_t krpc_SpaceCenter_CommLink_EndAntenna(krpc_connection_t connection, krpc_SpaceCenter_Antenna_t * returnValue, krpc_SpaceCenter_CommLink_t instance) The antenna at :func:`krpc_SpaceCenter_CommLink_End` that receives over the link, or ``nullptr`` if :func:`krpc_SpaceCenter_CommLink_End` is a ground station or an unloaded vessel. .. note:: Requires RealAntennas. .. type:: krpc_SpaceCenter_CommLinkType_t The type of a communication link. See :func:`krpc_SpaceCenter_CommLink_Type`. .. macro:: KRPC_ENUMERATION_SPACECENTER_COMMLINKTYPE The service and enumeration ids of the enumeration, for :func:`krpc_KRPC_Type_EnumerationTypeById` and :func:`krpc_KRPC_Expression_ConstantEnumById`. .. macro:: KRPC_SPACECENTER_COMMLINKTYPE_HOME Link is to a base station on Kerbin. .. macro:: KRPC_SPACECENTER_COMMLINKTYPE_CONTROL Link is to a control source, for example a manned spacecraft. .. macro:: KRPC_SPACECENTER_COMMLINKTYPE_RELAY Link is to a relay satellite. .. type:: krpc_SpaceCenter_CommNode_t Represents a communication node in the network. For example, a vessel or the KSC. .. macro:: KRPC_STRUCT_SPACECENTER_COMMNODE The service and structure ids of the structure, for :func:`krpc_KRPC_Type_StructTypeById`. .. member:: char * name Name of the communication node. .. macro:: KRPC_FIELD_SPACECENTER_COMMNODE_NAME The position of the field, for :func:`krpc_KRPC_Expression_GetFieldByIndex`. .. member:: bool is_home Whether the communication node is on Kerbin. .. macro:: KRPC_FIELD_SPACECENTER_COMMNODE_ISHOME The position of the field, for :func:`krpc_KRPC_Expression_GetFieldByIndex`. .. member:: bool is_control_point Whether the communication node is a control point, for example a manned vessel. .. macro:: KRPC_FIELD_SPACECENTER_COMMNODE_ISCONTROLPOINT The position of the field, for :func:`krpc_KRPC_Expression_GetFieldByIndex`. .. member:: bool is_vessel Whether the communication node is a vessel. .. macro:: KRPC_FIELD_SPACECENTER_COMMNODE_ISVESSEL The position of the field, for :func:`krpc_KRPC_Expression_GetFieldByIndex`. .. member:: krpc_nullable_object_t vessel The vessel for this communication node, or null if the node is not a vessel. .. macro:: KRPC_FIELD_SPACECENTER_COMMNODE_VESSEL The position of the field, for :func:`krpc_KRPC_Expression_GetFieldByIndex`.