If OSC is what you're looking for, have you tried this example panel I posted a little while ago? It doesn't appear to require changing the endian-ness of the bytes at all:
<abs contexttype="opengear" style="">
<meta>
<params>
<param access="1" maxlength="0" name="Host" oid="Host" type="STRING" value="localhost" widget="text"/>
<param access="1" constraint="0.0;65535.0;0.0;65535.0;1" constrainttype="INT_STEP_RANGE" name="Port" oid="Port" precision="0" type="INT32" value="0" widget="spinner"/>
<param access="1" maxlength="0" name="Message" oid="Message" type="STRING" value="/playbackcontroller/paused " widget="text"/>
<param access="1" constrainttype="INT_NULL" name="Value" oid="Value" precision="0" type="INT32" value="0" widget="default"/>
</params>
<api>function createOSCMessage(cmd, val, isFloat)
{
var messageBuilder = ogscript.createMessageBuilder();
var len = cmd.length+1;
var pad = (4 - len%4)%4;
var cmdLen = len+pad; // must be integer multiple of 4
//ogscript.debug ("length: " + len + " pad: " + pad + " = " + cmdLen);
messageBuilder.writeString(cmd);
// put null terminator at end of command string
messageBuilder.writeChar(0); // null terminator
// pad end of command string with nulls
for (var i=0; i<pad; ++i)
{
messageBuilder.writeChar(0);
}
// set the 4 bytes that identify the format
messageBuilder.writeChar(',');
if (isFloat)
{
messageBuilder.writeChar('f');
}
else
{
messageBuilder.writeChar('i');
}
messageBuilder.writeChar(0);
messageBuilder.writeChar(0);
// tack on the value
if (isFloat)
{
messageBuilder.writeFloat(val);
}
else
{
messageBuilder.writeInt(val);
}
return messageBuilder.toByteArray();
}
function sendOSCMessageInt(ip, port, cmd, val)
{
ogscript.sendUDPBytes(ip, port, createOSCMessage(cmd, val, false));
}
function sendOSCMessageFloat(ip, port, cmd, val)
{
ogscript.sendUDPBytes(ip, port, createOSCMessage(cmd, val, true));
}
</api>
</meta>
<table height="367" left="21" top="19" width="493">
<tr>
<label colspan="2" fill="both" insets="2,2,2,2" name="Send OSC Command" rowspan="1" style="txt-align:center;bg#dark;size:Bigger;font:bold;" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Host: " rowspan="1" style="txt-align:east;" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="Host" rowspan="1" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Port: " rowspan="1" style="txt-align:east;" weighty="1.0"/>
<param anchor="west" colspan="1" expand="true" fill="vertical" insets="2,2,2,2" oid="Port" rowspan="1" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Message: " rowspan="1" style="txt-align:east;" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="Message" rowspan="1" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Value: " rowspan="1" style="txt-align:east;" weighty="1.0"/>
<param anchor="west" colspan="1" expand="true" fill="vertical" insets="2,2,2,2" oid="Value" rowspan="1" weighty="1.0"/>
</tr>
<tr>
<button buttontype="push" colspan="2" fill="both" insets="2,2,2,2" name="Go! (Float)" rowspan="1" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">/*! block id=1005,1001,1002,1003,1004 !*/
sendOSCMessageFloat(params.getValue('Host', 0), params.getValue('Port', 0), params.getValue('Message', 0), params.getValue('Value', 0))
/*!!
<block id="1005" type="function_sendOSCMessageFloat" x="283" y="10" w="243" ip="ID:1001" port="ID:1002" cmd="ID:1003" val="ID:1004" />
<block id="1001" type="param_Host (Host)[0]" x="10" y="10" w="243" SET="" />
<block id="1002" type="param_Port (Port)[0]" x="10" y="72" w="243" SET="" />
<block id="1003" type="param_Message (Message)[0]" x="10" y="134" w="243" SET="" />
<block id="1004" type="param_Value (Value)[0]" x="10" y="196" w="243" SET="" />
!!*/
/*!!<checksum>37e85f509c16c798f6976597013f4ce2</checksum>!!*/</task>
</button>
</tr>
<tr>
<button buttontype="push" colspan="2" fill="both" insets="2,2,2,2" name="Go! (Int)" rowspan="1" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">
/*! block id=1006,1001,1002,1003,1004 !*/
sendOSCMessageInt(params.getValue('Host', 0), params.getValue('Port', 0), params.getValue('Message', 0), params.getValue('Value', 0))
/*!!
<block id="1006" type="function_sendOSCMessageInt" x="283" y="10" w="243" ip="ID:1001" port="ID:1002" cmd="ID:1003" val="ID:1004" />
<block id="1001" type="param_Host (Host)[0]" x="10" y="10" w="243" SET="" />
<block id="1002" type="param_Port (Port)[0]" x="10" y="72" w="243" SET="" />
<block id="1003" type="param_Message (Message)[0]" x="10" y="134" w="243" SET="" />
<block id="1004" type="param_Value (Value)[0]" x="10" y="196" w="243" SET="" />
!!*/
/*!!<checksum>7ad40349f4a60fbeaab59c3f232b9b10</checksum>!!*/</task>
</button>
</tr>
</table>
</abs>
#DashBoard