InSim enumerations
Introduction
InSim provides a number of enumerations that are used with the various available packets. The following is an exhaustive list of the documented enumerations in InSim 10 as of LFS 0.8B.
ISP
Packet types.
enum // the second byte of any packet is one of these
{
ISP_NONE, // 0 : not used
ISP_ISI, // 1 - instruction : insim initialise
ISP_VER, // 2 - info : version info
ISP_TINY, // 3 - both ways : multi purpose
ISP_SMALL, // 4 - both ways : multi purpose
ISP_STA, // 5 - info : state info
ISP_SCH, // 6 - instruction : single character
ISP_SFP, // 7 - instruction : state flags pack
ISP_SCC, // 8 - instruction : set car camera
ISP_CPP, // 9 - both ways : cam pos pack
ISP_ISM, // 10 - info : start multiplayer
ISP_MSO, // 11 - info : message out
ISP_III, // 12 - info : hidden /i message
ISP_MST, // 13 - instruction : type message or /command
ISP_MTC, // 14 - instruction : message to a connection
ISP_MOD, // 15 - instruction : set screen mode
ISP_VTN, // 16 - info : vote notification
ISP_RST, // 17 - info : race start
ISP_NCN, // 18 - info : new connection
ISP_CNL, // 19 - info : connection left
ISP_CPR, // 20 - info : connection renamed
ISP_NPL, // 21 - info : new player (joined race)
ISP_PLP, // 22 - info : player pit (keeps slot in race)
ISP_PLL, // 23 - info : player leave (spectate - loses slot)
ISP_LAP, // 24 - info : lap time
ISP_SPX, // 25 - info : split x time
ISP_PIT, // 26 - info : pit stop start
ISP_PSF, // 27 - info : pit stop finish
ISP_PLA, // 28 - info : pit lane enter / leave
ISP_CCH, // 29 - info : camera changed
ISP_PEN, // 30 - info : penalty given or cleared
ISP_TOC, // 31 - info : take over car
ISP_FLG, // 32 - info : flag (yellow or blue)
ISP_PFL, // 33 - info : player flags (help flags)
ISP_FIN, // 34 - info : finished race
ISP_RES, // 35 - info : result confirmed
ISP_REO, // 36 - both ways : reorder (info or instruction)
ISP_NLP, // 37 - info : node and lap packet
ISP_MCI, // 38 - info : multi car info
ISP_MSX, // 39 - instruction : type message
ISP_MSL, // 40 - instruction : message to local computer
ISP_CRS, // 41 - info : car reset
ISP_BFN, // 42 - both ways : delete buttons / receive button requests
ISP_AXI, // 43 - info : autocross layout information
ISP_AXO, // 44 - info : hit an autocross object
ISP_BTN, // 45 - instruction : show a button on local or remote screen
ISP_BTC, // 46 - info : sent when a user clicks a button
ISP_BTT, // 47 - info : sent after typing into a button
ISP_RIP, // 48 - both ways : replay information packet
ISP_SSH, // 49 - both ways : screenshot
ISP_CON, // 50 - info : contact between cars (collision report)
ISP_OBH, // 51 - info : contact car + object (collision report)
ISP_HLV, // 52 - info : report incidents that would violate HLVC
ISP_PLC, // 53 - instruction : player cars
ISP_AXM, // 54 - both ways : autocross multiple objects
ISP_ACR, // 55 - info : admin command report
ISP_HCP, // 56 - instruction : car handicaps
ISP_NCI, // 57 - info : new connection - extra info for host
ISP_JRR, // 58 - instruction : reply to a join request (allow / disallow)
ISP_UCO, // 59 - info : report InSim checkpoint / InSim circle
ISP_OCO, // 60 - instruction : object control (currently used for lights)
ISP_TTC, // 61 - instruction : multi purpose - target to connection
ISP_SLC, // 62 - info : connection selected a car
ISP_CSC, // 63 - info : car state changed
ISP_CIM, // 64 - info : connection's interface mode
ISP_MAL, // 65 - both ways : set mods allowed
ISP_PLH, // 66 - both ways : set player handicaps
ISP_IPB, // 67 - both ways : set IP bans
ISP_AIC, // 68 - instruction : set AI control value
ISP_AII, // 69 - info : info about AI car
};
TINY
IS_TINY packet sub-types.
enum // the fourth byte of an IS_TINY packet is one of these
{
TINY_NONE, // 0 - keep alive : see "maintaining the connection"
TINY_VER, // 1 - info request : get version
TINY_CLOSE, // 2 - instruction : close insim
TINY_PING, // 3 - ping request : external progam requesting a reply
TINY_REPLY, // 4 - ping reply : reply to a ping request
TINY_VTC, // 5 - both ways : game vote cancel (info or request)
TINY_SCP, // 6 - info request : send camera pos
TINY_SST, // 7 - info request : send state info
TINY_GTM, // 8 - info request : get time in ms (in SMALL_RTP)
TINY_MPE, // 9 - info : multi player end
TINY_ISM, // 10 - info request : get multiplayer info (in ISP_ISM)
TINY_REN, // 11 - info : race end (return to race setup screen)
TINY_CLR, // 12 - info : all players cleared from race
TINY_NCN, // 13 - info request : get NCN for all connections
TINY_NPL, // 14 - info request : get all players
TINY_RES, // 15 - info request : get all results
TINY_NLP, // 16 - info request : send an IS_NLP
TINY_MCI, // 17 - info request : send an IS_MCI
TINY_REO, // 18 - info request : send an IS_REO
TINY_RST, // 19 - info request : send an IS_RST
TINY_AXI, // 20 - info request : send an IS_AXI - AutoX Info
TINY_AXC, // 21 - info : autocross cleared
TINY_RIP, // 22 - info request : send an IS_RIP - Replay Information Packet
TINY_NCI, // 23 - info request : get NCI for all guests (on host only)
TINY_ALC, // 24 - info request : send a SMALL_ALC (allowed cars)
TINY_AXM, // 25 - info request : send IS_AXM packets for the entire layout
TINY_SLC, // 26 - info request : send IS_SLC packets for all connections
TINY_MAL, // 27 - info request : send IS_MAL listing the allowed mods
TINY_PLH, // 28 - info request : send IS_PLH listing player handicaps
TINY_IPB, // 29 - info request : send IS_IPB listing the IP bans
TINY_LCL, // 30 - info request : send a SMALL_LCL for local car's lights
};
SMALL
IS_SMALL packet sub-types.
enum // the fourth byte of an IS_SMALL packet is one of these
{
SMALL_NONE, // 0 : not used
SMALL_SSP, // 1 - instruction : start sending positions
SMALL_SSG, // 2 - instruction : start sending gauges
SMALL_VTA, // 3 - report : vote action
SMALL_TMS, // 4 - instruction : time stop
SMALL_STP, // 5 - instruction : time step
SMALL_RTP, // 6 - info : race time packet (reply to TINY_GTM)
SMALL_NLI, // 7 - instruction : set node lap interval
SMALL_ALC, // 8 - both ways : set or get allowed cars (reply to TINY_ALC)
SMALL_LCS, // 9 - instruction : set local car switches (flash, horn, siren)
SMALL_LCL, // 10 - both ways : set or get local car lights (reply to TINY_LCL)
SMALL_AII, // 11 - info request : get local AI info
};
TTC
IS_TTC packet sub-types
enum // the fourth byte of an IS_TTC packet is one of these
{
TTC_NONE, // 0 : not used
TTC_SEL, // 1 - info request : send IS_AXM for a layout editor selection
TTC_SEL_START, // 2 - info request : send IS_AXM every time the selection changes
TTC_SEL_STOP, // 3 - instruction : switch off IS_AXM requested by TTC_SEL_START
};
MSO
IS_MSO packet's UserType.
enum
{
MSO_SYSTEM, // 0 - system message
MSO_USER, // 1 - normal visible user message
MSO_PREFIX, // 2 - hidden message starting with special prefix (see ISI)
MSO_O, // 3 - hidden message typed on local pc with /o command
MSO_NUM
};
SND
Message sounds, used in IS_MSL and IS_MTC.
enum
{
SND_SILENT,
SND_MESSAGE,
SND_SYSMESSAGE,
SND_INVALIDKEY,
SND_ERROR,
SND_NUM
};
VOTE
Vote actions, used in IS_VTN and SMALL_VTA.
enum
{
VOTE_NONE, // 0 - no vote
VOTE_END, // 1 - end race
VOTE_RESTART, // 2 - restart
VOTE_QUALIFY, // 3 - qualify
VOTE_NUM
};
CIM
IS_CIM modes.
enum
{
CIM_NORMAL, // 0 - not in a special mode
CIM_OPTIONS, // 1
CIM_HOST_OPTIONS, // 2
CIM_GARAGE, // 3
CIM_CAR_SELECT, // 4
CIM_TRACK_SELECT, // 5
CIM_SHIFTU, // 6 - free view mode
CIM_NUM
};
NRM
Submodes for CIM_NORMAL.
enum
{
NRM_NORMAL,
NRM_WHEEL_TEMPS, // F9
NRM_WHEEL_DAMAGE, // F10
NRM_LIVE_SETTINGS, // F11
NRM_PIT_INSTRUCTIONS, // F12
NRM_NUM
};
GRG
Submodes for CIM_GARAGE.
enum
{
GRG_INFO,
GRG_COLOURS,
GRG_BRAKE_TC,
GRG_SUSP,
GRG_STEER,
GRG_DRIVE,
GRG_TYRES,
GRG_AERO,
GRG_PASS,
GRG_NUM
};
Note: An additional, undocumented value of 255 is available and corresponds to the mods rating tab.
FVM
Submodes for CIM_SHIFTU (Free View Mode).
enum
{
FVM_PLAIN, // no buttons displayed
FVM_BUTTONS, // buttons displayed (not editing)
FVM_EDIT, // edit mode
FVM_NUM
};
PITLANE
Pitlane facts for IS_PLA.
enum
{
PITLANE_EXIT, // 0 - left pit lane
PITLANE_ENTER, // 1 - entered pit lane
PITLANE_NO_PURPOSE, // 2 - entered for no purpose
PITLANE_DT, // 3 - entered for drive-through
PITLANE_SG, // 4 - entered for stop-go
PITLANE_NUM
};
PSE
Pit work flags for IS_PIT.
enum
{
PSE_NOTHING, // bit 0 (1)
PSE_STOP, // bit 1 (2)
PSE_FR_DAM, // bit 2 (4)
PSE_FR_WHL, // etc...
PSE_LE_FR_DAM,
PSE_LE_FR_WHL,
PSE_RI_FR_DAM,
PSE_RI_FR_WHL,
PSE_RE_DAM,
PSE_RE_WHL,
PSE_LE_RE_DAM,
PSE_LE_RE_WHL,
PSE_RI_RE_DAM,
PSE_RI_RE_WHL,
PSE_BODY_MINOR,
PSE_BODY_MAJOR,
PSE_SETUP,
PSE_REFUEL,
PSE_NUM
};
VIEW
View identifiers.
enum
{
VIEW_FOLLOW, // 0 - arcade
VIEW_HELI, // 1 - helicopter
VIEW_CAM, // 2 - tv camera
VIEW_DRIVER, // 3 - cockpit
VIEW_CUSTOM, // 4 - custom
VIEW_MAX
};
LFS
Languages, used in IS_NCI.
enum
{
LFS_ENGLISH, // 0
LFS_DEUTSCH, // 1
LFS_PORTUGUESE, // 2
LFS_FRENCH, // 3
LFS_SUOMI, // 4
LFS_NORSK, // 5
LFS_NEDERLANDS, // 6
LFS_CATALAN, // 7
LFS_TURKISH, // 8
LFS_CASTELLANO, // 9
LFS_ITALIANO, // 10
LFS_DANSK, // 11
LFS_CZECH, // 12
LFS_RUSSIAN, // 13
LFS_ESTONIAN, // 14
LFS_SERBIAN, // 15
LFS_GREEK, // 16
LFS_POLSKI, // 17
LFS_CROATIAN, // 18
LFS_HUNGARIAN, // 19
LFS_BRAZILIAN, // 20
LFS_SWEDISH, // 21
LFS_SLOVAK, // 22
LFS_GALEGO, // 23
LFS_SLOVENSKI, // 24
LFS_BELARUSSIAN, // 25
LFS_LATVIAN, // 26
LFS_LITHUANIAN, // 27
LFS_TRADITIONAL_CHINESE, // 28
LFS_SIMPLIFIED_CHINESE, // 29
LFS_JAPANESE, // 30
LFS_KOREAN, // 31
LFS_BULGARIAN, // 32
LFS_LATINO, // 33
LFS_UKRAINIAN, // 34
LFS_INDONESIAN, // 35
LFS_ROMANIAN, // 36
LFS_NUM_LANG // 37
};
LEAVR
IS_CNL leave reasons.
enum
{
LEAVR_DISCO, // 0 - none
LEAVR_TIMEOUT, // 1 - timed out
LEAVR_LOSTCONN, // 2 - lost connection
LEAVR_KICKED, // 3 - kicked
LEAVR_BANNED, // 4 - banned
LEAVR_SECURITY, // 5 - security
LEAVR_CPW, // 6 - cheat protection wrong
LEAVR_OOS, // 7 - out of sync with host
LEAVR_JOOS, // 8 - join OOS (initial sync failed)
LEAVR_HACK, // 9 - invalid packet
LEAVR_NUM
};
PENALTY
Penalties, used in IS_PEN, IS_LAP, IS_SPX, IS_PIT.
enum
{
PENALTY_NONE, // 0
PENALTY_DT, // 1
PENALTY_DT_VALID, // 2
PENALTY_SG, // 3
PENALTY_SG_VALID, // 4
PENALTY_30, // 5
PENALTY_45, // 6
PENALTY_NUM
};
PENR
IS_PEN penalty reasons.
enum
{
PENR_UNKNOWN, // 0 - unknown or cleared penalty
PENR_ADMIN, // 1 - penalty given by admin
PENR_WRONG_WAY, // 2 - wrong way driving
PENR_FALSE_START, // 3 - starting before green light
PENR_SPEEDING, // 4 - speeding in pit lane
PENR_STOP_SHORT, // 5 - stop-go pit stop too short
PENR_STOP_LATE, // 6 - compulsory stop is too late
PENR_NUM
};
TYRE
Tyre compounds, used in IS_NPL and IS_PIT.
enum
{
TYRE_R1, // 0
TYRE_R2, // 1
TYRE_R3, // 2
TYRE_R4, // 3
TYRE_ROAD_SUPER, // 4
TYRE_ROAD_NORMAL, // 5
TYRE_HYBRID, // 6
TYRE_KNOBBLY, // 7
TYRE_NUM
};
JRR
IS_JRR actions.
enum
{
JRR_REJECT,
JRR_SPAWN,
JRR_2,
JRR_3,
JRR_RESET,
JRR_RESET_NO_REPAIR,
JRR_6,
JRR_7,
};
UCO
IS_UCO actions.
enum
{
UCO_CIRCLE_ENTER, // entered a circle
UCO_CIRCLE_LEAVE, // left a circle
UCO_CP_FWD, // crossed cp in forward direction
UCO_CP_REV, // crossed cp in reverse direction
};
CSC
IS_CSC actions.
enum
{
CSC_STOP,
CSC_START,
};
OCO
IS_OCO actions.
enum
{
OCO_ZERO, // reserved
OCO_1, //
OCO_2, //
OCO_3, //
OCO_LIGHTS_RESET, // give up control of all lights
OCO_LIGHTS_SET, // use Data byte to set the bulbs
OCO_LIGHTS_UNSET, // give up control of the specified lights
OCO_NUM
};
PMO
IS_AXM PMOAction values.
enum
{
PMO_LOADING_FILE, // 0 - sent by the layout loading system only
PMO_ADD_OBJECTS, // 1 - adding objects (from InSim or editor)
PMO_DEL_OBJECTS, // 2 - delete objects (from InSim or editor)
PMO_CLEAR_ALL, // 3 - clear all objects (NumO must be zero)
PMO_TINY_AXM, // 4 - a reply to a TINY_AXM request
PMO_TTC_SEL, // 5 - a reply to a TTC_SEL request
PMO_SELECTION, // 6 - set a connection's layout editor selection
PMO_POSITION, // 7 - user pressed O without anything selected
PMO_GET_Z, // 8 - request Z values / reply with Z values
PMO_NUM
};
RIP
IS_RIP error codes.
enum
{
RIP_OK, // 0 - OK: completed instruction
RIP_ALREADY, // 1 - OK: already at the destination
RIP_DEDICATED, // 2 - can't run a replay - dedicated host
RIP_WRONG_MODE, // 3 - can't start a replay - not in a suitable mode
RIP_NOT_REPLAY, // 4 - RName is zero but no replay is currently loaded
RIP_CORRUPTED, // 5 - IS_RIP corrupted (e.g. RName does not end with zero)
RIP_NOT_FOUND, // 6 - the replay file was not found
RIP_UNLOADABLE, // 7 - obsolete / future / corrupted
RIP_DEST_OOB, // 8 - destination is beyond replay length
RIP_UNKNOWN, // 9 - unknown error found starting replay
RIP_USER, // 10 - replay search was terminated by user
RIP_OOS, // 11 - can't reach destination - SPR is out of sync
};
SSH
IS_SSH error codes.
enum
{
SSH_OK, // 0 - OK: completed instruction
SSH_DEDICATED, // 1 - can't save a screenshot - dedicated host
SSH_CORRUPTED, // 2 - IS_SSH corrupted (e.g. Name does not end with zero)
SSH_NO_SAVE, // 3 - could not save the screenshot
};
BFN
IS_BFN actions.
enum // the fourth byte of IS_BFN packets is one of these
{
BFN_DEL_BTN, // 0 - instruction : delete one button or range of buttons (must set ClickID)
BFN_CLEAR, // 1 - instruction : clear all buttons made by this insim instance
BFN_USER_CLEAR, // 2 - info : user cleared this insim instance's buttons
BFN_REQUEST, // 3 - user request : SHIFT+B or SHIFT+I - request for buttons
};
DL
OutGauge dash lights.
enum
{
DL_SHIFT, // bit 0 - shift light
DL_FULLBEAM, // bit 1 - full beam
DL_HANDBRAKE, // bit 2 - handbrake
DL_PITSPEED, // bit 3 - pit speed limiter
DL_TC, // bit 4 - TC active or switched off
DL_SIGNAL_L, // bit 5 - left turn signal
DL_SIGNAL_R, // bit 6 - right turn signal
DL_SIGNAL_ANY, // bit 7 - shared turn signal
DL_OILWARN, // bit 8 - oil pressure warning
DL_BATTERY, // bit 9 - battery warning
DL_ABS, // bit 10 - ABS active or switched off
DL_ENGINE, // bit 11 - engine damage
DL_FOG_REAR, // bit 12
DL_FOG_FRONT, // bit 13
DL_DIPPED, // bit 14 - dipped headlight symbol
DL_FUELWARN, // bit 15 - low fuel warning light
DL_SIDELIGHTS, // bit 16 - sidelights symbol
DL_NEUTRAL, // bit 17 - neutral light
DL_18,
DL_19,
DL_20,
DL_21,
DL_22,
DL_23,
DL_NUM
};