Difference between revisions of "IS SMALL"
m |
Bokujishin (talk | contribs) m |
||
| (One intermediate revision by the same user 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. | ||
| − | + | {| 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 == | |
| − | |||
| − | |||
| − | == Packet | ||
=== Size === | === Size === | ||
| Line 21: | Line 37: | ||
=== Type === | === Type === | ||
| − | The packet type from the ISP_ enumeration, always ISP_SMALL. | + | The packet type from the [[InSim_enumerations#ISP|ISP_]] enumeration, always ISP_SMALL. |
=== ReqI === | === 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 35: | 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 | + | * 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]] | + | * 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 | + | A general purpose 4-byte unsigned integer, the meaning of which varies depending on [[#SubT|SubT]]. |
[[Category:InSim packets]] | [[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.
| 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.