Latest revision |
Your text |
Line 1: |
Line 1: |
− | ----
| + | {{DesignDocument}} |
− | =NetMsg Generic Templates=
| |
− | ----
| |
− | The GSNet API provides several Template classes to be used or extended from.
| |
| | | |
− | * [[GenericOneByteMsg|Generic One Byte Msg]]
| + | |
− | * [[GenericTwoBytesMsg|Generic Two Byte Msg]]
| + | ==Common Header Byte Format== |
− | * [[GenericFourBytesMsg|Generic Four Byte Msg]]
| + | All [[IBME_GeometryService#NetMsg_Class|NetMsgs]] will contain a uniform header: |
− | * [[GenericEightByteMsg|Generic Eight Byte Msg]]
| + | |
− | * [[GenericMultiByteMsg|Generic Multi Byte Msg]]
| + | |
− | * [[GenericOneStringMsg|Generic One String Msg]]
| + | {|border="1" |
− | * [[GenericMultiStringMsg|Generic Multi-String Msg]]
| + | |width="180"|'''Element''' |
− | | + | |width="180"|'''Length''' |
− | ----
| + | |width="180"|'''Notes''' |
− | | + | |- |
− | =NetMsg MsgTypes=
| + | |Magic1 |
− | ----
| + | |int16 (2 Bytes) |
− | | + | |Always 0x41FE |
− | Some NetMsgs will need to have custom bodies. Here is a list of NetMsgs, their related MsgTypes, and links to details on that specific NetMsg:
| + | |- |
− | <br /><br />
| + | |Magic2 |
− | '''NOTE:''' This list is *NOT* up-to-date as of 3.25.11
| + | |int16 (2 Bytes) |
− | <br /><br />
| + | |Always 0x5309 |
− | '''TODO:''' Replace this with Doxy files
| |
− | <br /><br />
| |
− | | |
− | {|style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #666699; padding: 0;" | |
− | |style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF; width: 90px;"|'''MsgType ID''' | |
− | |style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF; width: 200px;"|'''Name''' | |
− | |style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF; width: 180px;"|'''Parent Class''' | |
− | |style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF;"|'''Additional Info''' | |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0042 | + | |MessageLength |
− | |style="border: 1px solid #666699;"|RUALIVE | + | |int32 (4 bytes) |
− | |style="border: 1px solid #666699;"|[[TypeOnlyMsg]]
| + | | |
− | |style="border: 1px solid #666699;"|Ping without time info (necessary?) | |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0043 | + | |MsgType |
− | |style="border: 1px solid #666699;"|IMALIVE | + | |int16 (2 bytes) |
− | |style="border: 1px solid #666699;"|[[TypeOnlyMsg]]
| + | | |
− | |style="border: 1px solid #666699;"|Pong without time info (necessary?) | |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0050 | + | |MessageUUID |
− | |style="border: 1px solid #666699;"|Failure
| + | |[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]] |
− | |style="border: 1px solid #666699;"|[[GenericOneByteMsg]]
| + | | |
− | |style="border: 1px solid #666699;"|1 byte 'error code' | |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0051 | + | |HasRegardingUUID |
− | |style="border: 1px solid #666699;"|Success | + | |Boolean (1 byte) |
− | |style="border: 1px solid #666699;"|[[GenericOneByteMsg]]
| + | | |
− | |style="border: 1px solid #666699;"|1 byte 'success code' | |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0060 | + | |RegardingMessageUUID |
− | |style="border: 1px solid #666699;"|PING
| + | |[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]] |
− | |style="border: 1px solid #666699;"|[[GenericEightByteMsg]]
| + | | |
− | |style="border: 1px solid #666699;"|8 byte time stamp for start time
| + | |} |
| + | |
| + | ==NetMsg Generic Templates== |
| + | The GSNet Protocol provides several Template classes to be used or extended from. |
| + | |
| + | {| |
| + | !width="200" align="center"| |
| + | !width="200" align="center"| |
| + | !width="200" align="center"| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0062 | + | | [[GenericOneByteMsg]] |
− | |style="border: 1px solid #666699;"|PONG | + | | [[GenericTwoBytesMsg]] |
− | |style="border: 1px solid #666699;"|[[GenericEightByteMsg]]
| + | | [[GenericFourBytesMsg]] |
− | |style="border: 1px solid #666699;"|8 byte time stamp for start time, dup of the ping value
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0100 | + | | [[GenericMultiByteMsg]] |
− | |style="border: 1px solid #666699;"|GS Remote Nodename Set | + | | [[GenericOneStringMsg]] |
− | |style="border: 1px solid #666699;"|[[GenericOneStringMsg]]
| + | | |
− | |style="border: 1px solid #666699;"|String is the Nodename | + | |} |
| + | |
| + | ==NetMsg MsgTypes== |
| + | Some [[IBME_GeometryService#NetMsg_Class|NetMsgs]] will need to have custom bodies. Here is a list of [[IBME_GeometryService#NetMsg_Class|NetMsgs]], their related MsgTypes, and links to details on that specific [[IBME_GeometryService#NetMsg_Class|NetMsg]]: |
| + | |
| + | |
| + | {| |
| + | !width="55" |MsgTypeID |
| + | !Description |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0150 | + | |0 |
− | |style="border: 1px solid #666699;"|Disconnect Request
| + | |[[Failure]] |
− | |style="border: 1px solid #666699;"|[[TypeOnlyMsg]]
| |
− | |style="border: 1px solid #666699;"|
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0200 | + | |5 |
− | |style="border: 1px solid #666699;"|New Node on Network
| + | |[[Success]] |
− | |style="border: 1px solid #666699;"|[[GenericOneStringMsg]]
| |
− | |style="border: 1px solid #666699;"|String is the Nodename
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0250 | + | |align="center"|100 |
− | |style="border: 1px solid #666699;"|Full Nodename List Request | + | |[[RemHostNameSET]] |
− | |style="border: 1px solid #666699;"|
| |
− | |style="border: 1px solid #666699;"|'''''Not Implemented Yet'''
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0255 | + | |align="center"|150 |
− | |style="border: 1px solid #666699;"|Full Nodename List | + | |[[DisconnectREQ]] |
− | |style="border: 1px solid #666699;"|
| |
− | |style="border: 1px solid #666699;"|'''''Not Implemented Yet'''
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0300 | + | |align="center"|200 |
− | |style="border: 1px solid #666699;"|[[NewSessionReqMsg|New Session Request]]
| + | |[[NewHostOnNet]] |
− | |style="border: 1px solid #666699;"|[[NetMsg]]
| |
− | |style="border: 1px solid #666699;"|Two strings, username and password
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0305 | + | |align="center"|250 |
− | |style="border: 1px solid #666699;"|[[SessionInfoMsg|Session Information]]
| + | |[[FullHostListREQ]]* |
− | |style="border: 1px solid #666699;"|[[NetMsg]]
| |
− | |style="border: 1px solid #666699;"|One string, the session UUID
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0400 | + | |align="center"|255 |
− | |style="border: 1px solid #666699;"|[[GeometryReqMsg|Geometry Request]]
| + | |[[FullHostList]]* |
− | |style="border: 1px solid #666699;"|[[GenericOneStringMsg]]
| |
− | |style="border: 1px solid #666699;"|Has additional custom fields.
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0401 | + | |align="center"|300 |
− | |style="border: 1px solid #666699;"|[[GeometryBoTReqMsg|BoT Geometry Request]]
| + | |[[NewSessionREQ]]* |
− | |style="border: 1px solid #666699;"|[[GenericOneStringMsg]]
| |
− | |style="border: 1px solid #666699;"|Requests geometry in BoT format, with exactly one BoT per region.
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0402 | + | |align="center"|305 |
− | |style="border: 1px solid #666699;"|[[GeometryListReqMsg|Geometry List Request]]
| + | |[[NewSession]]* |
− | |style="border: 1px solid #666699;"|[[GenericOneStringMsg]]
| |
− | |style="border: 1px solid #666699;"|Requests a list of geometry artifacts at given location.
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0403 | + | |align="center"|400 |
− | |style="border: 1px solid #666699;"|[[GeometryListResMsg|Geometry List Results]]
| + | |[[GeometryREQ]] |
− | |style="border: 1px solid #666699;"|[[GenericMultiStringMsg]]
| |
− | |style="border: 1px solid #666699;"|Display a list of geometry artifact names.
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0405 | + | |align="center"|405 |
− | |style="border: 1px solid #666699;"|[[GeometryManifestMsg|Geometry Manifest]]
| + | |[[GeometryMANIFEST]] |
− | |style="border: 1px solid #666699;"|[[GenericMultiStringMsg]]
| |
− | |style="border: 1px solid #666699;"|List of 'object' names about to be received as chunks. ReUUID is the associated GeometryReqMsg UUID.
| |
| |- | | |- |
− | |style="border: 1px solid #666699;"|0x0410 | + | |align="center"|410 |
− | |style="border: 1px solid #666699;"|[[GeometryChunkMsg|Geometry Chunk]]
| + | |[[GeometryCHUNK]] |
− | |style="border: 1px solid #666699;"|[[GenericMultiByteMsg]]
| |
− | |style="border: 1px solid #666699;"|Raw .g information. Chunks can be written to a file to produce a viable V5 .g db. ReUUID is the associated GeometryReqMsg UUID.
| |
| |} | | |} |