Difference between revisions of "IS SMALL"

From LFS Manual
Jump to navigationJump to search
 
m
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
The IS_SMALL packet is a general purpose packet comprised of 8 bytes. The packet is designed to prevent repeating a common structure which would be the same for many packets. Unlike the [[IS_TINY]] the IS_SMALL also contains the UVal, a 4 byte unsigned integer.
 
The IS_SMALL packet is a general purpose packet comprised of 8 bytes. The packet is designed to prevent repeating a common structure which would be the same for many packets. Unlike the [[IS_TINY]] the IS_SMALL also contains the UVal, a 4 byte unsigned integer.
  
== Packet Detail ==
+
{| class="wikitable"
 +
|+ IS_SMALL packet properties
 +
|-
 +
! Type !! Name !! Description
 +
|-
 +
| byte
 +
| Size
 +
| 8
 +
|-
 +
| byte
 +
| Type
 +
| ISP_SMALL
 +
|-
 +
| byte
 +
| ReqI
 +
| 0 unless it is an info request or a reply to an info request
 +
|-
 +
| byte
 +
| SubT
 +
| subtype, from SMALL_ enumeration (e.g. SMALL_SSP)
 +
|-
 +
| unsigned
 +
| UVal
 +
| value (e.g. for SMALL_SSP this would be the OutSim packet rate)
 +
|}
 +
 
 +
== Packet Details ==
  
 
=== Size ===
 
=== Size ===
Line 11: Line 37:
 
=== Type ===
 
=== Type ===
  
The packet type from the ISP_ enumeration, always 4.
+
The packet type from the [[InSim_enumerations#ISP|ISP_]] enumeration, always ISP_SMALL.
  
 
=== ReqI ===
 
=== ReqI ===
  
The ReqI must always be set to non-zero when sending a request to LFS for information, and in turn the replying packet will contain the same value set in its ReqI.  
+
ReqI must be set to non-zero when sending a request for information to LFS, and in turn the replying packet will contain the same value set in its ReqI. For packets sent by LFS without a request, ReqI is zero.
  
 
=== SubT ===
 
=== SubT ===
 +
 +
The packet's sub-type, which is a value from the [[InSim_enumerations#SMALL|SMALL_]] enum.
  
 
* SMALL_NONE: Not used
 
* SMALL_NONE: Not used
Line 25: Line 53:
 
* SMALL_TMS: Send in single-player mode to stop time, 1 means to stop and 0 to carry on. This freezes the game but is not the same as pausing, as the game must be unfrozen before any further actions can be undertaken
 
* SMALL_TMS: Send in single-player mode to stop time, 1 means to stop and 0 to carry on. This freezes the game but is not the same as pausing, as the game must be unfrozen before any further actions can be undertaken
 
* SMALL_STP: Send when frozen to update the game time by the specified hundredths
 
* SMALL_STP: Send when frozen to update the game time by the specified hundredths
* SMALL_RTP: Sent in response to a [[IS_TINY]] with a SubT of TINY_GTH. Contains the time in hundredths
+
* SMALL_RTP: Sent in response to an [[IS_TINY]] with a SubT of TINY_GTH. Contains the time in ms.
* SMALL_NLI: Send to set the [[IS_NLP]] node lap interval
+
* SMALL_NLI: Send to set the [[IS_NLP]]/[[IS_MCI]] interval
 +
* SMALL_ALC: Send to set allowed cars; sent in reply to [[IS_TINY]] TINY_ALC.
 +
* SMALL_LCS: Send to set the local car's switches; sent in reply to [[IS_TINY]] TINY_LCS.
 +
* SMALL_LCL: Send to set the local car's lights; sent in reply to [[IS_TINY]] TINY_LCL.
 +
* SMALL_AII: Send to request a local AI car's info.
 +
 
 +
Note: SMALL_TMS and SMALL_STP are currently not available in LFS 0.8B/InSim 10.
  
 
=== UVal ===
 
=== UVal ===
  
A general purpose 4 byte unsigned integer, the meaning of which varies depending on the SubT.
+
A general purpose 4-byte unsigned integer, the meaning of which varies depending on [[#SubT|SubT]].
 +
 
 +
[[Category:InSim packets]]

Latest revision as of 19:43, 9 February 2026

Introduction

The IS_SMALL packet is a general purpose packet comprised of 8 bytes. The packet is designed to prevent repeating a common structure which would be the same for many packets. Unlike the IS_TINY the IS_SMALL also contains the UVal, a 4 byte unsigned integer.

IS_SMALL packet properties
Type Name Description
byte Size 8
byte Type ISP_SMALL
byte ReqI 0 unless it is an info request or a reply to an info request
byte SubT subtype, from SMALL_ enumeration (e.g. SMALL_SSP)
unsigned UVal value (e.g. for SMALL_SSP this would be the OutSim packet rate)

Packet Details

Size

The size of the packet, always 8 bytes.

Type

The packet type from the ISP_ enumeration, always ISP_SMALL.

ReqI

ReqI must be set to non-zero when sending a request for information to LFS, and in turn the replying packet will contain the same value set in its ReqI. For packets sent by LFS without a request, ReqI is zero.

SubT

The packet's sub-type, which is a value from the SMALL_ enum.

  • SMALL_NONE: Not used
  • SMALL_SSP: Request to start sending OutSim packets at the specified interval
  • SMALL_SSG: Request to start sending OutGauge packets at the specified interval
  • SMALL_VTA: Send to set the current vote action, from the VOTE_ enumeration
  • SMALL_TMS: Send in single-player mode to stop time, 1 means to stop and 0 to carry on. This freezes the game but is not the same as pausing, as the game must be unfrozen before any further actions can be undertaken
  • SMALL_STP: Send when frozen to update the game time by the specified hundredths
  • SMALL_RTP: Sent in response to an IS_TINY with a SubT of TINY_GTH. Contains the time in ms.
  • SMALL_NLI: Send to set the IS_NLP/IS_MCI interval
  • SMALL_ALC: Send to set allowed cars; sent in reply to IS_TINY TINY_ALC.
  • SMALL_LCS: Send to set the local car's switches; sent in reply to IS_TINY TINY_LCS.
  • SMALL_LCL: Send to set the local car's lights; sent in reply to IS_TINY TINY_LCL.
  • SMALL_AII: Send to request a local AI car's info.

Note: SMALL_TMS and SMALL_STP are currently not available in LFS 0.8B/InSim 10.

UVal

A general purpose 4-byte unsigned integer, the meaning of which varies depending on SubT.