Class StringMessage

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

public class StringMessage extends OpenIGTMessage
  • Constructor Details

    • StringMessage

      public StringMessage(String deviceName)
    • StringMessage

      public StringMessage(String deviceName, String msg)
    • StringMessage

      public StringMessage(Header head, byte[] body) throws Exception
      Throws:
      Exception
  • Method Details

    • unpackBody

      public boolean unpackBody() throws Exception
      Description copied from class: OpenIGTMessage
      ** To create body from body array

      **

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

      public byte[] packBody()
      Description copied from class: OpenIGTMessage
      ** To create body from image_header and image_data SetImageHeader and SetImageData must have called first

      **

      Specified by:
      packBody in class OpenIGTMessage
      Returns:
      the bytes array containing the message
    • toString

      public String toString()
      Description copied from class: OpenIGTMessage
      ** To get message String **
      Specified by:
      toString in class OpenIGTMessage
      Returns:
      the message String
    • getEncoding

      public short getEncoding()
    • getLength

      public short getLength()
    • getMessage

      public String getMessage()