orbitx/data_structures.py
def as_proto(self) -> protos.EngineeringState:
        """Returns a deep copy of this EngineeringState as a protobuf."""
        # If the ordering of component fields, change here too #Y_VECTOR_CHANGESITE
        constructed_protobuf = protos.EngineeringState()
        constructed_protobuf.CopyFrom(self._proto_state)
        for component_data, component in zip(self.components, constructed_protobuf.components):
            (
                component.connected, component.capacity,
                component.temperature, component.coolant_hab_one,
                component.coolant_hab_two, component.coolant_ayse
            ) = (
                component_data.connected, component_data.capacity,
                component_data.temperature, component_data.coolant_hab_one,
                component_data.coolant_hab_two, component_data.coolant_ayse
            )
        for coolant_data, coolant in zip(self.coolant_loops, constructed_protobuf.coolant_loops):
            (
                coolant.coolant_temp, coolant.primary_pump_on,
                coolant.secondary_pump_on
            ) = (
                coolant_data.coolant_temp, coolant_data.primary_pump_on,
                coolant_data.secondary_pump_on
            )
        for radiator_data, radiator in zip(self.radiators, constructed_protobuf.radiators):
            (
                radiator.attached_to_coolant_loop, radiator.functioning,
            ) = (
                radiator_data.attached_to_coolant_loop, radiator_data.functioning,
            )
        return constructed_protobuf
Returns a deep copy of this EngineeringState as a protobuf.
Returns a deep copy of this EngineeringState as a protobuf.
Returns a deep copy of this EngineeringState as a protobuf .
def as_proto(self) -> protos.EngineeringState:
        constructed_protobuf = protos.EngineeringState()
        constructed_protobuf.CopyFrom(self._proto_state)
        for component_data, component in zip(self.components, constructed_protobuf.components):
            (
                component.connected, component.capacity,
                component.temperature, component.coolant_hab_one,
                component.coolant_hab_two, component.coolant_ayse
            ) = (
                component_data.connected, component_data.capacity,
                component_data.temperature, component_data.coolant_hab_one,
                component_data.coolant_hab_two, component_data.coolant_ayse
            )
        for coolant_data, coolant in zip(self.coolant_loops, constructed_protobuf.coolant_loops):
            (
                coolant.coolant_temp, coolant.primary_pump_on,
                coolant.secondary_pump_on
            ) = (
                coolant_data.coolant_temp, coolant_data.primary_pump_on,
                coolant_data.secondary_pump_on
            )
        for radiator_data, radiator in zip(self.radiators, constructed_protobuf.radiators):
            (
                radiator.attached_to_coolant_loop, radiator.functioning,
            ) = (
                radiator_data.attached_to_coolant_loop, radiator_data.functioning,
            )
        return constructed_protobuf
def as_proto ( self ) -> protos . EngineeringState : constructed_protobuf = protos . EngineeringState ( ) constructed_protobuf . CopyFrom ( self . _proto_state ) for component_data , component in zip ( self . components , constructed_protobuf . components ) : ( component . connected , component . capacity , component . temperature , component . coolant_hab_one , component . coolant_hab_two , component . coolant_ayse ) = ( component_data . connected , component_data . capacity , component_data . temperature , component_data . coolant_hab_one , component_data . coolant_hab_two , component_data . coolant_ayse ) for coolant_data , coolant in zip ( self . coolant_loops , constructed_protobuf . coolant_loops ) : ( coolant . coolant_temp , coolant . primary_pump_on , coolant . secondary_pump_on ) = ( coolant_data . coolant_temp , coolant_data . primary_pump_on , coolant_data . secondary_pump_on ) for radiator_data , radiator in zip ( self . radiators , constructed_protobuf . radiators ) : ( radiator . attached_to_coolant_loop , radiator . functioning , ) = ( radiator_data . attached_to_coolant_loop , radiator_data . functioning , ) return constructed_protobuf
Returns a deep copy of this EngineeringState as a protobuf.
Returns a deep copy of this EngineeringState as a protobuf .
"""Returns a deep copy of this EngineeringState as a protobuf.""" # If the ordering of component fields, change here too #Y_VECTOR_CHANGESITE
self