Difference between revisions of "NetMsgTypes"

From BRL-CAD
(Common Header Byte Format)
(Common Header Byte Format)
Line 9: Line 9:
 
|width="180"|'''Element'''
 
|width="180"|'''Element'''
 
|width="180"|'''Length'''
 
|width="180"|'''Length'''
 +
|width="180"|'''Notes'''
 
|-
 
|-
|Magic1 (2 Bytes)
+
|Magic1
 +
|int16 (2 Bytes)
 
|Always 0x41FE
 
|Always 0x41FE
 
|-
 
|-
|Magic2 (2 Bytes)
+
|Magic2
 +
|int16 (2 Bytes)
 
|Always 0x5309
 
|Always 0x5309
 
|-
 
|-
 
|MessageLength
 
|MessageLength
 
|int32 (4 bytes)
 
|int32 (4 bytes)
 +
|
 
|-
 
|-
 
|MsgType
 
|MsgType
 
|int16 (2 bytes)
 
|int16 (2 bytes)
 +
|
 
|-
 
|-
 
|MessageUUID
 
|MessageUUID
 
|[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]]
 
|[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]]
 +
|
 
|-
 
|-
 
|HasRegardingUUID
 
|HasRegardingUUID
 
|Boolean (1 byte)
 
|Boolean (1 byte)
 +
|
 
|-
 
|-
 
|RegardingMessageUUID
 
|RegardingMessageUUID
 
|[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]]
 
|[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]]
 +
|
 
|}
 
|}
  

Revision as of 07:09, 21 September 2010

Design icon.png This page contains the design document for an enhancement or feature. The design should be considered a work in progress and may not represent the final design. As this is a collaborative design, contributions and participation from other developers and users is encouraged. Use the discussion page for providing comments and suggestions.


Common Header Byte Format

All NetMsgs will contain a uniform header:


Element Length Notes
Magic1 int16 (2 Bytes) Always 0x41FE
Magic2 int16 (2 Bytes) Always 0x5309
MessageLength int32 (4 bytes)
MsgType int16 (2 bytes)
MessageUUID String (Variable bytes)
HasRegardingUUID Boolean (1 byte)
RegardingMessageUUID String (Variable bytes)

NetMsg Generic Templates

     
GenericOneByteMsg GenericTwoBytesMsg GenericFourBytesMsg
GenericMultiByteMsg GenericOneStringMsg

NetMsg MsgTypes

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:


MsgTypeID Description
0 Failure
5 Success
100 RemHostNameSET
150 DisconnectREQ
200 NewHostOnNet
250 FullHostListREQ*
255 FullHostList*
300 NewSessionREQ*
305 NewSession*
400 GeometryREQ
405 GeometryMANIFEST
410 GeometryCHUNK