================================================================================
CLIENT -> SERVER HEADERS
================================================================================

Bytes 0 and 1 are the only two bytes that are strictly defined.  All subsequent bytes are *generally* arguments to the server function being called.

byte 0:  Transaction Type
--------------------------------------------------------------------------------

From sicommon_net.h

#define SI_MPC_NETWORK_TYPE_COMMMAND	0
#define SI_MPC_NETWORK_TYPE_FEEDBACK	1
#define SI_MPC_NETWORK_TYPE_INT		2

Client can only send a SI_MPC_NETWORK_TYPE_COMMMAND transaction.  FEEDBACK and INT are reserved for server -> client transactions.

byte 1:  Function
--------------------------------------------------------------------------------

'b' = Target Read
'c' = Target Write
'd' = Bit Load
'f' = Coff Load
'h' = DSP Active Communication
'm' = Send Message
'n' = Clear Message Flag
'p' = No Op
'r' = Reset Board
'x' = Shut Down Server
'0' = Exit


TARGET READ  (total header bytes 18)
--------------------------------------------------------------------------------
[2:5] - region
[6:9] - width
[10:13] - count
[14:17] - address


TARGET WRITE (total header bytes 18)
--------------------------------------------------------------------------------
[2:5] - region
[6:9] - width
[10:13] - count
[14:17] - address

[18:x] - data

NOTE: Data follows the 18 byte header with length 'count' * 1, 2, or 4 for byte, word, or dword accesses respectively.


BIT LOAD (total header bytes 6 + variable length files/filenames)
--------------------------------------------------------------------------------
[2] - boardID
[3] - daughterID
[4] - gpioID
[5] - remote

if (remote == 1)
{
	[6:9] - length of carrier filename
	[10:x] - carrier filename
	if (daughterID == 1)
		[x:x+3] - length of daughter filename
		[x+4:y] - daughter filename
}
else
{
	[6:9] - size of carrier file
	[10:x] - carrier file
	if (daughterID == 1)
		[x:x+3] - size of daughter file
		[x+4:y] - daughter file
}


COFF LOAD (total header bytes 4 + variable length files/filenames)
--------------------------------------------------------------------------------
[2] - option
[3] - remote

if (remote == 1)
{
	[4:7] - length of COFF filename
	[8:x] - COFF filename
}
else
{
	[4:7] - size of COFF file
	[8:x] - COFF file
}


DSP ACTIVE COMMUNICATION (total header bytes 18)
--------------------------------------------------------------------------------
[2:5] - commMode
[6:9] - Write
[10:13] - address
[14:17] - count

if (Write == 1)
{
	[18:x] - data
}

NOTE: Data follows the 18 byte header with length 'count' * 4 (all DSP active accesses are dword).


SEND MESSAGE (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - message


CLEAR MESSAGE FLAG (total header bytes 2)
--------------------------------------------------------------------------------
No other header information is needed or sent.


NO OP (total header bytes 2)
--------------------------------------------------------------------------------
No other header information is needed or sent.


RESET BOARD (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - resetMode


SHUT DOWN SERVER (total header bytes 2)
--------------------------------------------------------------------------------
No other header information is needed or sent.


EXIT (total header bytes 2)
--------------------------------------------------------------------------------
No other header information is needed or sent.


================================================================================
SERVER -> CLIENT HEADERS
================================================================================

Byte 0 is the only byte that is strictly defined.

byte 0:  Transaction Type
--------------------------------------------------------------------------------

From sicommon_net.h

#define SI_MPC_NETWORK_TYPE_COMMMAND	0
#define SI_MPC_NETWORK_TYPE_FEEDBACK	1
#define SI_MPC_NETWORK_TYPE_INT		2

Server can send any of the three transaction types


SI_MPC_NETWORK_TYPE_COMMMAND
================================================================================

byte 1:  Function
--------------------------------------------------------------------------------

'b' = Target Read
'c' = Target Write
'd' = Bit Load
'f' = Coff Load
'h' = DSP Active Communication
'm' = Send Message
'n' = Clear Message Flag
'p' = No Op
'r' = Reset Board
'x' = Shut Down Server
'0' = Exit

TARGET READ  (total header bytes 10)
--------------------------------------------------------------------------------
[2:5] - length
[6:9] - error

[10:x] - data

NOTE: if error does not equal e_Err_NoError then data will not be sent.


TARGET WRITE (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - error


BIT LOAD (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - error


COFF LOAD (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - error


DSP ACTIVE COMMUNICATION (total header bytes 22)
--------------------------------------------------------------------------------
[2:5] - commMode
[6:9] - Write
[10:13] - count
[14:17] - error
[18:21] - cont (continue)

NOTE: For DSP Reads, if cont = 1 then there is more data coming.  The client should read 'count' * 4 bytes of data, adjust its pointer, and wait another header and data.


SEND MESSAGE
--------------------------------------------------------------------------------
Does not exist in the way of a COMMAND.  This is handled in the INT case.


CLEAR MESSAGE FLAG (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - error


NO OP (total header bytes 2)
--------------------------------------------------------------------------------
No other header information is needed or sent.


RESET BOARD (total header bytes 6)
--------------------------------------------------------------------------------
[2:5] - error


SHUT DOWN SERVER (total header bytes 0)
--------------------------------------------------------------------------------
Nothing is sent back to the client in the case.


EXIT (total header bytes 0)
--------------------------------------------------------------------------------
Nothing is sent back to the client in the case.


SI_MPC_NETWORK_TYPE_FEEDBACK
================================================================================
[1:4] - length of message
[5:x] - message


SI_MPC_NETWORK_TYPE_INT
================================================================================
[1:4] - message
