How to decode a DACS lock in Java out from the RSSL Update Message

I want to read the DACS Lock from a RSSL Update Message for News RIC NFCP_UBMS
At best I can get the Byte Array ( byte dacsLock[] ) from the Byte Buffer. Have you an example how to deal with Byte Buffer vaules?

Here is what I can see so far:
Decode RSSL Update Message Byte Buffer

public void onUpdateMsg(UpdateMsg updateMsg, OmmConsumerEvent event)

{

System.out.println("hasPermissionData: " + updateMsg.hasPermissionData());

System.out.println("permissionData: " + updateMsg.permissionData().toString());

}

Output

hasPermissionData: true

permissionData: java.nio.HeapByteBuffer[pos=0 lim=5 cap=2000]

Best Regards

Michael

Tagged:

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hello @michael.theimer01

    As mentioned previously, please see these two articles, which talk about Open DACS in general, and show how to decode a DACS lock.

    In your EMA code, if the message has permission data, it is available as nio.ByteBuffer. You can print it to console -

    if(msg.hasPermissionData())	{
      System.out.print("Permission Data: ");
      for(byte b : msg.permissionData().array())
        System.out.print(String.format("%02X ", b));
    }
    

    Produces an output like -

    Permission Data: 03 01 01 62 C0 00 00 00 00 00
    

    The structure of this byte array are described in the above linked articles.

    Version: 03
    ServiceID: 0101
    PE: 62
    End: C0