Package org.medcare.igtl.messages
Class CapabilityMessage
java.lang.Object
org.medcare.igtl.messages.OpenIGTMessage
org.medcare.igtl.messages.CapabilityMessage
** This class create an Capability object from bytes received or help to generate
bytes to send from it
-
Field Summary
Fields inherited from class org.medcare.igtl.messages.OpenIGTMessage
bytesArray, deviceName, VERSION
-
Constructor Summary
ConstructorDescriptionCapabilityMessage
(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 **CapabilityMessage
(Header header, byte[] body) ** Constructor to be used to create message from received data -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
** To get capability_data byte array **** To get capabilityList ArrayList **byte[]
packBody()
** To create body from image_header and image_data SetCapabilityData must have called firstvoid
SetCapabilityData
(byte[] capability_data) ** To extract capabilityList capability_data byte arraybyte[]
SetCapabilityData
(ArrayList<String> capabilityList) ** To create capability_data from capabilityList and to get the byte array to sendtoString()
** To get capability String **boolean
** To create body from body arrayMethods inherited from class org.medcare.igtl.messages.OpenIGTMessage
getBody, getBytes, getDeviceName, getHeader, setBody, setHeader, Unpack
-
Field Details
-
IGTL_CAPABILITY_TYPE_LENGTH
public static int IGTL_CAPABILITY_TYPE_LENGTH
-
-
Constructor Details
-
CapabilityMessage
** 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
** Constructor to be used to create message from received data- Parameters:
header
-body
-- Throws:
Exception
-
-
Method Details
-
unpackBody
** To create body from body array**
- Specified by:
unpackBody
in classOpenIGTMessage
- 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 classOpenIGTMessage
- Returns:
- the bytes array containing the body
-
SetCapabilityData
** 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
** To get capabilityList ArrayList **- Returns:
- the capabilityList
-
toString
** To get capability String **- Specified by:
toString
in classOpenIGTMessage
- Returns:
- the capability String
-