Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::NewChannelMessage Class Reference

The NewChannelMessage class encapsulates the message sent to the Katana Catalog Server (KCS) to specify that a new channel should be reserved in the Catalog for a given frame. More...

#include <NewChannelMessage.h>

Inheritance diagram for Foundry::Katana::NewChannelMessage:
Foundry::Katana::Message Foundry::Katana::NewChannelMessage_v2

List of all members.

Public Member Functions

 NewChannelMessage (const NewFrameMessage &frame, uint16_t channelID=0, uint32_t height=0, uint32_t width=0, int xorigin=0, int yorigin=0, float sampleRate1=0.0, float sampleRate2=0.0, uint32_t dataSize=0)
 Create a new instance of NewChannelMessage message using an existing NewFrame object to obtain the unique frame ID.
 NewChannelMessage (const uint8_t *frameID, uint16_t channelID=0, uint32_t height=0, uint32_t width=0, int xorigin=0, int yorigin=0, float sampleRate1=0.0, float sampleRate2=0.0, uint32_t dataSize=0)
 Create a new instance of a NewChannelMessage specifying a pointer to a 16 byte array that will contain a unique frame ID.
virtual ~NewChannelMessage ()
 Destroy the NewChannelMessage instance.
int setChannelName (const std::string &name)
 Set the human readable name that will be seen in the Monitor.
void setChannelDimensions (uint32_t width, uint32_t height)
 Set the width and height of this channel.
void setChannelOrigin (int ox, int oy)
 Set the origin of this channel.
void setDataSize (uint32_t dataSize)
 Set the size - in bytes - of a pixels worth of data in this channel.
void setChannelID (uint16_t channelID)
 Set the channel ID to identify this channel within a frame.
const uint8_t * frameUUID () const
 Get the unique 128 bit identifier that is assigned to the frame this channel is a member of.

Detailed Description

The NewChannelMessage class encapsulates the message sent to the Katana Catalog Server (KCS) to specify that a new channel should be reserved in the Catalog for a given frame.

The NewChannelMessage message should be sent down the KatanaPipe after a NewFrame message has been sent as the NewFrame message will reserve the frame in the Catalog.

A channel represents a given output pass by a renderer, such as the primary colour pass, id pass, depth pass P pass etc.

Each NewChannelMessage object must be created with with reference to a valid unique frame ID so Katana will know which frame the channel belongs to.


Constructor & Destructor Documentation

Foundry::Katana::NewChannelMessage::NewChannelMessage ( const NewFrameMessage frame,
uint16_t  channelID = 0,
uint32_t  height = 0,
uint32_t  width = 0,
int  xorigin = 0,
int  yorigin = 0,
float  sampleRate1 = 0.0,
float  sampleRate2 = 0.0,
uint32_t  dataSize = 0 
)

Create a new instance of NewChannelMessage message using an existing NewFrame object to obtain the unique frame ID.

The default constructor will create a new channel belonging to the specified frame with all values set to 0 and an empty string for the channel name.

Note: the NewChannelMessage object will NOT maintain a reference to NewFrameMessage or assume ownership of it.

Parameters:
[in]framean existing NewFrameMessage object
[in]channelIDan ID number to identify this channel within the frame. (This can just be sequential from zero). The most significant bit in this field is reserved for internal use, providing a maximum channel ID of 32767.
[in]heightthe height of this channel in pixels.
[in]widththe width of this channel in pixels.
[in]xoriginthe x origin of this channel relative to the frame's x origin
[in]yoriginthe y origin of this channel relative to the frame's y origin.
[in]sampleRate1sampleRate1
[in]sampleRate2sampleRate2
[in]dataSizethe size - in bytes - of a single pixel of data for this channel.
See also:
setChannelName()
Foundry::Katana::NewChannelMessage::NewChannelMessage ( const uint8_t *  frameID,
uint16_t  channelID = 0,
uint32_t  height = 0,
uint32_t  width = 0,
int  xorigin = 0,
int  yorigin = 0,
float  sampleRate1 = 0.0,
float  sampleRate2 = 0.0,
uint32_t  dataSize = 0 
)

Create a new instance of a NewChannelMessage specifying a pointer to a 16 byte array that will contain a unique frame ID.

The default for other values will create a new channel belonging to the specified frame with all values set to 0 and an empty string for the channel name.

Parameters:
[in]frameIDa pointer to a 16 byte array containing a unique 128 bit frame ID.
[in]channelIDan ID number to identify this channel within the frame. (This can just be sequential from zero). The most significant bit in this field is reserved for internal use. Provding a maximum channel ID of 32767.
[in]heightthe height of this channel in pixels.
[in]widththe width of this channel in pixels.
[in]xoriginthe x origin of this channel relative to the frame's x origin
[in]yoriginthe y origin of this channel relative to the frame's y origin.
[in]sampleRate1sampleRate1
[in]sampleRate2sampleRate2
[in]dataSizethe size - in bytes - of a single pixel of data for this channel.
See also:
setChannelName()

Member Function Documentation

const uint8_t* Foundry::Katana::NewChannelMessage::frameUUID ( ) const

Get the unique 128 bit identifier that is assigned to the frame this channel is a member of.

Returns:
a pointer to the start of the 16 uint8_t array that contains the unique frame ID.
void Foundry::Katana::NewChannelMessage::setChannelDimensions ( uint32_t  width,
uint32_t  height 
)

Set the width and height of this channel.

Parameters:
[in]widththe width of this channel in pixels
[in]heightthe height of this channel in pixels
void Foundry::Katana::NewChannelMessage::setChannelID ( uint16_t  channelID)

Set the channel ID to identify this channel within a frame.

The most significant bit in this field is reserved for internal use. Provding a maximum channel ID of 32767.

Parameters:
[in]channelIDthe channel ID for this channel.
int Foundry::Katana::NewChannelMessage::setChannelName ( const std::string &  name)

Set the human readable name that will be seen in the Monitor.

The maximum number of characters that can be specified in name is 8000.

Parameters:
[in]namethe name that will be sent to the KCS and appear in the Monitor
Returns:
0 if the name was set successfully, otherwise nonzero, if nonzero is returned the existing name will remain unchanged.
void Foundry::Katana::NewChannelMessage::setChannelOrigin ( int  ox,
int  oy 
)

Set the origin of this channel.

Parameters:
[in]oxthe x origin relative to the x origin of the frame to which this channel belongs to.
[in]oythe y origin relative to the y origin of the frame to which this channel belongs to.
void Foundry::Katana::NewChannelMessage::setDataSize ( uint32_t  dataSize)

Set the size - in bytes - of a pixels worth of data in this channel.

For example - if for each pixel this channel contains 4-channel color values stored as float values the size would be 4 * sizeof(float) and thus setDataSize(16).

Parameters:
[in]dataSizethe size in bytes of a pixel of data.

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator