IS MCI

From LFS Manual
Jump to navigationJump to search

Introduction

The Multi Car Info is sent by LFS as a reply to a TINY_MCI request, or at regular intervals if requested in IS_ISI.

IS_MCI packet properties
Type Name Description
byte Size 4 + NumC * 28
byte Type ISP_MCI
byte ReqI 0 unless this is a reply to an TINY_MCI request
byte NumC number of valid CompCar structs in this packet
CompCar Info[MCI_MAX_CARS] car info for each player, 1 to MCI_MAX_CARS (NumC)

Packet Details

Size

The size of the packet varies from 4 to 452 bytes, depending on NumC. The maximum size is governed by MCI_MAX_CARS:

const int MCI_MAX_CARS = 16;

Type

The packet type from the ISP_ enumeration, always ISP_MCI.

ReqI

ReqI is equal to zero, unless the packet is a reply to a TINY_MCI request.

NumC

The number of cars in the packet.

Info

A list of CompCar structs, one for each car.

Notes

Since the maximum number of cars per packet is currently 16, you can receive up to 3 IS_MCI packets for each request or after each interval. If you need to process data for all cars, you should check the CompCar Info flags for CCI_FIRST and CCI_LAST, to make sure you include every car.