IS SMALL

From LFS Manual
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.

struct IS_SMALL // General purpose 8 byte packet
{
	byte Size;		// always 8
	byte Type;		// always 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 Detail

Size

The size of the packet, always 8 bytes.

Type

The packet type from the ISP_ enumeration, always ISP_SMALL.

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.

SubT

  • 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 a IS_TINY with a SubT of TINY_GTH. Contains the time in hundredths
  • SMALL_NLI: Send to set the IS_NLP node lap interval

UVal

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