Skip to main content

AVxcelerate Simulation Framework 2026 R1

Class simulation_framework::autonomy::communication::messages::VehicleControlInput

Last update: 09.03.2026

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 63)

VehicleControlInput message.

Inherits from AutonomyMsg (see [autonomy/communication/messages/autonomy_msg.h](autonomy__msg_8h.md which provides common fields and operations: timestamp(), ByteSizeLong(), SerializeToArray() and ParseFromArray().

This class implements the message-specific payload layout and the pair of virtual hooks the base class calls:

?> The payload encodes the following fields (in this order):

  • object_id (uint64_t)

  • control_mode (uint8_t)

  • throttle (tag + value). Tag: 0=int32, 1=double

  • steering (tag + value). Tag: 0=int32, 1=double

  • max_acceleration (double)

  • max_deceleration (double)

?> Serialization/parsing helpers used by this class (writeLE / readLE) perform buffer bounds checks and will throw std::runtime_error on overflow/underflow.

Inherits from:

Members

Public attributes

Variable object_id

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 70)

uint64_t simulation_framework::autonomy::communication::messages::VehicleControlInput::object_id {0}

Identifier for the controlled object (typically a unique actor id).

Type: uint64_t

Variable control_mode

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 73)

VehicleControlMode simulation_framework::autonomy::communication::messages::VehicleControlInput::control_mode {VehicleControlMode::INVALID}

How to interpret the throttle/steering values.

Type: VehicleControlMode

Variable throttle

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 76)

ThrottleType simulation_framework::autonomy::communication::messages::VehicleControlInput::throttle

Throttle value; variant - > ThrottleType.

Type: ThrottleType

Variable steering

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 79)

SteeringType simulation_framework::autonomy::communication::messages::VehicleControlInput::steering

Steering value; variant -> SteeringType.

Type: SteeringType

Variable max_acceleration

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 82)

double simulation_framework::autonomy::communication::messages::VehicleControlInput::max_acceleration {0.0}

Maximum allowed acceleration (m/s^2) for analog controllers.

Type: double

Variable max_deceleration

Definition: autonomy/communication/messages/vehicle_control_input_msg/vehicle_control_input_msg.h (line 85)

double simulation_framework::autonomy::communication::messages::VehicleControlInput::max_deceleration {0.0}

Maximum allowed deceleration (positive number, m/s^2).

Type: double

Public functions

Function VehicleControlInput

simulation_framework::autonomy::communication::messages::VehicleControlInput::VehicleControlInput()=default

Default-construct a VehicleControlInput message.

Return type:

Protected functions

Function PayloadSize

size_t simulation_framework::autonomy::communication::messages::VehicleControlInput::PayloadSize() const noexcept override

Compute the size in bytes of the serialized payload only.

Returns:

number of bytes required to serialize the payload (not including base size)

?> This must match the bytes consumed/produced by SerializePayload/ParsePayload.

Return type: size_t

Reimplements: PayloadSize

Function SerializePayload

void simulation_framework::autonomy::communication::messages::VehicleControlInput::SerializePayload(unsigned char *&ptr, size_t &remaining) const override

Serialize the payload-specific fields into the provided buffer.

Parameters:

  • ptr: Reference to the current write pointer; advanced as bytes are written.
  • remaining: Reference to remaining bytes in the buffer; decreased as bytes are written.

Exceptions:

  • std::runtime_error: if the buffer does not have enough space or if an internal serialization helper detects an error. Underlying helpers throw on overflow.

?> The function writes tag bytes for variant fields (throttle and steering):

  • tag 0: int32 representation follows

  • tag 1: double representation follows Implementations must not perform manual pointer arithmetic; use writeLE which already enforces bounds and endianness.

Parameters:

Return type: void

Reimplements: SerializePayload

Function ParsePayload

void simulation_framework::autonomy::communication::messages::VehicleControlInput::ParsePayload(const unsigned char *&ptr, size_t &remaining) override

Parse the payload-specific fields from the provided buffer.

Parameters:

  • ptr: Reference to the current read pointer; advanced as bytes are consumed.
  • remaining: Reference to remaining bytes in the buffer; decreased as bytes are read.

Exceptions:

  • std::runtime_error: if the buffer does not contain the expected bytes or if an internal read helper detects an underflow or malformed value.

?> This function expects the same layout described in the class-level documentation and will reconstruct variant fields based on the tag bytes written by SerializePayload.If tags are invalid, it throws std::runtime_error.

Parameters:

Return type: void

Reimplements: ParsePayload

Connect with Ansys