Class CapabilityMessage

java.lang.Object
org.medcare.igtl.messages.OpenIGTMessage
org.medcare.igtl.messages.CapabilityMessage

public class CapabilityMessage extends OpenIGTMessage
** This class create an Capability object from bytes received or help to generate bytes to send from it
  • Field Details

    • IGTL_CAPABILITY_TYPE_LENGTH

      public static int IGTL_CAPABILITY_TYPE_LENGTH
  • Constructor Details

    • CapabilityMessage

      public CapabilityMessage(String deviceName)
      ** Constructor to be used to create message to send them with this constructor you must use method SetImageHeader, then CreateBody and then getBytes to send them **
      Parameters:
      deviceName - Device Name
    • CapabilityMessage

      public CapabilityMessage(Header header, byte[] body) throws Exception
      ** Constructor to be used to create message from received data
      Parameters:
      header -
      body -
      Throws:
      Exception
  • Method Details

    • unpackBody

      public boolean unpackBody() throws Exception
      ** To create body from body array

      **

      Specified by:
      unpackBody in class OpenIGTMessage
      Returns:
      true if unpacking is ok
      Throws:
      Exception
    • packBody

      public byte[] packBody()
      ** To create body from image_header and image_data SetCapabilityData must have called first

      **

      Specified by:
      packBody in class OpenIGTMessage
      Returns:
      the bytes array containing the body
    • SetCapabilityData

      public byte[] SetCapabilityData(ArrayList<String> capabilityList)
      ** To create capability_data from capabilityList and to get the byte array to send
      Parameters:
      capabilityList - : Capability ArrayList this ArrayList can be created by MessageHandler or by ResponseHandler **
      Returns:
      the bytes array created from the value
    • SetCapabilityData

      public void SetCapabilityData(byte[] capability_data)
      ** To extract capabilityList capability_data byte array
      Parameters:
      capability_data -
    • GetCapabilityData

      public byte[] GetCapabilityData()
      ** To get capability_data byte array **
      Returns:
      the capability_data bytes array
    • GetCapabilityList

      public ArrayList<String> GetCapabilityList()
      ** To get capabilityList ArrayList **
      Returns:
      the capabilityList
    • toString

      public String toString()
      ** To get capability String **
      Specified by:
      toString in class OpenIGTMessage
      Returns:
      the capability String