Editing GeometryServiceNetworkProtocol

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 3: Line 3:
 
----
 
----
  
{|
+
The Geometry Service Network (GSNet) Protocol is a TCP/IP based protocol designed to facilitate socketed communications between Geometry Service Nodes on a network.  A Geometry Service Node is defined as any softwares that supports communication via the GSNet Protocol.
|width=344 valign=top|[[Image:GSNet_Symbol.png|left|top|GSNet]]
+
 
|The Geometry Service Network (GSNet) Protocol is a TCP/IP based protocol designed to facilitate socketed communications between Geometry Service Nodes on a network.  A Geometry Service Node is defined as any softwares that supports communication via the GSNet Protocol.
 
 
<br />
 
<br />
__TOC__
 
|}
 
 
 
----
 
----
  
 +
==Visual GSNet Msg Breakdown==
 +
[[Image:GSNetMsgBreakdown.png|520x373px]]
  
 +
----
  
=GSNet Msg Description=
+
==GSNet Msg==
==Header==
+
===Header===
The header of the GSNet Msg contains the information necessary for quickly determining authenticity, type and length.  Geometry Service's network library, libNetwork, has a header byte layout that looks like this:
+
The header of the GSNet Msg contains the information necessary for quickly determining authenticity, type and length.  Geometry Service's network library, libNetwork, is built upon BRL-CAD's networking library: libPKG.  This causes the header byte layout to look like this:
<br /><br />
 
 
   
 
   
{|style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #666699; padding: 0;"
+
{|border="1"
|style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF; width: 180px;"|'''Element'''
+
|width="180"|'''Element'''
|style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF; width: 180px;"|'''Length'''
+
|width="180"|'''Length'''
|style="border: 1px solid #666699; background-color: #666699; color: #FFFFFF; width: 180px;"|'''Value'''
+
|width="180"|'''Value'''
 +
|-
 +
|Magic1
 +
|int16 (2 Bytes)
 +
|Always 0x41FE
 +
|-
 +
|Magic2
 +
|int16 (2 Bytes)
 +
|Always 0x5309
 
|-
 
|-
|style="border: 1px solid #666699;"|MsgType
+
|MessageLength
|style="border: 1px solid #666699;"|int16 (2 bytes)
+
|int32 (4 bytes)
|style="border: 1px solid #666699;"|
+
|
 
|-
 
|-
|style="border: 1px solid #666699;"|MessageLength
+
|MsgType
|style="border: 1px solid #666699;"|int32 (4 bytes)
+
|int16 (2 bytes)
|style="border: 1px solid #666699;"|Does *NOT* include the type or length, so is packet size - 6
+
|
 
|-
 
|-
|style="border: 1px solid #666699;"|MessageUUID
+
|MessageUUID
|style="border: 1px solid #666699;"|[[GSNet_String|String (Variable bytes)]]
+
|[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]]
|style="border: 1px solid #666699;"|
+
|
 
|-
 
|-
|style="border: 1px solid #666699;"|HasRegardingUUID
+
|HasRegardingUUID
|style="border: 1px solid #666699;"|Boolean (1 byte)
+
|Boolean (1 byte)
|style="border: 1px solid #666699;"|
+
|
 
|-
 
|-
|style="border: 1px solid #666699;"|RegardingMessageUUID
+
|RegardingMessageUUID
|style="border: 1px solid #666699;"|[[GSNet_String|String (Variable bytes)]]
+
|[[IBME_NETWORKPROTO_STRING|String (Variable bytes)]]
|style="border: 1px solid #666699;"|
+
|
 
|}
 
|}
  
  
* '''MsgType:''' 2 byte integer value that tells what type of message this is.
+
====libPKG Part====
* '''MessageUUID:''' Standard UUID for this message.  Currently stored as a string.
+
====GSNet Part====
* '''HasRegardingUUID:''' Boolean flag that indicates whether there is a Regarding UUID or not.
+
 
* '''RegardingMessageUUID:''' Standard UUID that indicates this NetMsg is a response to another NetMsg.
 
  
 +
----
 +
===Data===
 
----
 
----
  
==Data==
 
----
 
The Data load of a NetMsg is, obivously, the important and unique part.  Data Loads can be as small as zero (in the case of a TypeOnlyMsg) or many kilobytes long.
 
  
Here is a list of [[NetMsgTypes|NetMsg types]] and here is a list of [[Common NetMsg Exchanges]].
+
List of [[NetMsgTypes]].
 +
 +
List of [[Common NetMsg Exchanges]]

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)