vrpn
07.33
Virtual Reality Peripheral Network
|
#include <vrpn_Imager.h>
Public Member Functions | |
vrpn_Imager_Server (const char *name, vrpn_Connection *c, vrpn_int32 nCols, vrpn_int32 nRows, vrpn_int32 nDepth=1) | |
int | add_channel (const char *name, const char *units="unsigned8bit", vrpn_float32 minVal=0, vrpn_float32 maxVal=255, vrpn_float32 scale=1, vrpn_float32 offset=0) |
Add a channel to the server, returns index of the channel or -1 on failure. More... | |
bool | send_begin_frame (const vrpn_uint16 cMin, const vrpn_uint16 cMax, const vrpn_uint16 rMin, const vrpn_uint16 rMax, const vrpn_uint16 dMin=0, const vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
Servers must send begin/end frame pairs around contiguous sections of the image. More... | |
bool | send_end_frame (const vrpn_uint16 cMin, const vrpn_uint16 cMax, const vrpn_uint16 rMin, const vrpn_uint16 rMax, const vrpn_uint16 dMin=0, const vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
bool | send_discarded_frames (const vrpn_uint16 count=0, const struct timeval *time=NULL) |
bool | send_region_using_base_pointer (vrpn_int16 chanIndex, vrpn_uint16 cMin, vrpn_uint16 cMax, vrpn_uint16 rMin, vrpn_uint16 rMax, const vrpn_uint8 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint16 nRows=0, bool invert_rows=false, vrpn_uint32 depthStride=0, vrpn_uint16 dMin=0, vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
Pack and send the region as efficiently as possible; strides are in steps of the element being sent. More... | |
bool | send_region_using_base_pointer (vrpn_int16 chanIndex, vrpn_uint16 cMin, vrpn_uint16 cMax, vrpn_uint16 rMin, vrpn_uint16 rMax, const vrpn_uint16 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint16 nRows=0, bool invert_rows=false, vrpn_uint32 depthStride=0, vrpn_uint16 dMin=0, vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to). More... | |
bool | send_region_using_base_pointer (vrpn_int16 chanIndex, vrpn_uint16 cMin, vrpn_uint16 cMax, vrpn_uint16 rMin, vrpn_uint16 rMax, const vrpn_float32 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint16 nRows=0, bool invert_rows=false, vrpn_uint32 depthStride=0, vrpn_uint16 dMin=0, vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to). More... | |
bool | send_region_using_first_pointer (vrpn_int16 chanIndex, vrpn_uint16 cMin, vrpn_uint16 cMax, vrpn_uint16 rMin, vrpn_uint16 rMax, const vrpn_uint8 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint16 nRows=0, bool invert_rows=false, vrpn_uint32 depthStride=0, vrpn_uint16 dMin=0, vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
Pack and send the region as efficiently as possible; strides are in steps of the element being sent. More... | |
bool | send_region_using_first_pointer (vrpn_int16 chanIndex, vrpn_uint16 cMin, vrpn_uint16 cMax, vrpn_uint16 rMin, vrpn_uint16 rMax, const vrpn_uint16 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint16 nRows=0, bool invert_rows=false, vrpn_uint32 depthStride=0, vrpn_uint16 dMin=0, vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to). More... | |
bool | send_region_using_first_pointer (vrpn_int16 chanIndex, vrpn_uint16 cMin, vrpn_uint16 cMax, vrpn_uint16 rMin, vrpn_uint16 rMax, const vrpn_float32 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint16 nRows=0, bool invert_rows=false, vrpn_uint32 depthStride=0, vrpn_uint16 dMin=0, vrpn_uint16 dMax=0, const struct timeval *time=NULL) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to). More... | |
bool | set_resolution (vrpn_int32 nCols, vrpn_int32 nRows, vrpn_int32 nDepth=1) |
Set the resolution to a different value than it had been before. Returns true on success. More... | |
bool | send_description (void) |
Sends a description of the imager so the remote can process the region messages. More... | |
virtual void | mainloop (void) |
Handle baseclass ping/pong messages. More... | |
![]() | |
vrpn_Imager (const char *name, vrpn_Connection *c=NULL) | |
vrpn_int32 | nRows (void) const |
vrpn_int32 | nCols (void) const |
vrpn_int32 | nDepth (void) const |
vrpn_int32 | nChannels (void) const |
![]() | |
vrpn_BaseClass (const char *name, vrpn_Connection *c=NULL) | |
Names the device and assigns or opens connection, calls registration methods. More... | |
virtual | ~vrpn_BaseClass () |
![]() | |
vrpn_BaseClassUnique () | |
virtual | ~vrpn_BaseClassUnique () |
Unregister all of the message handlers that were to be autodeleted. More... | |
vrpn_Connection * | connectionPtr () |
Returns a pointer to the connection this object is using. More... | |
Static Protected Member Functions | |
static int VRPN_CALLBACK | handle_ping_message (void *userdata, vrpn_HANDLERPARAM p) |
static int VRPN_CALLBACK | handle_throttle_message (void *userdata, vrpn_HANDLERPARAM p) |
static int VRPN_CALLBACK | handle_last_drop_message (void *userdata, vrpn_HANDLERPARAM p) |
![]() | |
static int | encode_text_message_to_buffer (char *buf, vrpn_TEXT_SEVERITY severity, vrpn_uint32 level, const char *msg) |
Encodes the body of the text message into a buffer, preparing for sending. More... | |
static int | decode_text_message_from_buffer (char *msg, vrpn_TEXT_SEVERITY *severity, vrpn_uint32 *level, const char *buf) |
Decodes the body of the text message from a buffer from the connection. More... | |
Protected Attributes | |
bool | d_description_sent |
vrpn_int32 | d_frames_to_send |
vrpn_uint16 | d_dropped_due_to_throttle |
![]() | |
vrpn_int32 | d_nRows |
vrpn_int32 | d_nCols |
vrpn_int32 | d_nDepth |
vrpn_int32 | d_nChannels |
vrpn_Imager_Channel | d_channels [vrpn_IMAGER_MAX_CHANNELS] |
vrpn_int32 | d_description_m_id |
vrpn_int32 | d_begin_frame_m_id |
vrpn_int32 | d_end_frame_m_id |
vrpn_int32 | d_discarded_frames_m_id |
vrpn_int32 | d_throttle_frames_m_id |
vrpn_int32 | d_regionu8_m_id |
vrpn_int32 | d_regionu12in16_m_id |
vrpn_int32 | d_regionu16_m_id |
vrpn_int32 | d_regionf32_m_id |
![]() | |
vrpn_Connection * | d_connection |
Connection that this object talks to. More... | |
char * | d_servicename |
Name of this device, not including the connection part. More... | |
vrpn_int32 | d_sender_id |
Sender ID registered with the connection. More... | |
vrpn_int32 | d_text_message_id |
ID for text messages. More... | |
vrpn_int32 | d_ping_message_id |
Ask the server if they are there. More... | |
vrpn_int32 | d_pong_message_id |
Server telling that it is there. More... | |
Additional Inherited Members | |
![]() | |
bool | shutup |
vrpn_MESSAGEHANDLER | handler |
vrpn_int32 | sender |
vrpn_int32 | type |
void * | userdata |
![]() | |
virtual int | register_types (void) |
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail. More... | |
![]() | |
virtual int | init (void) |
Initialize things that the constructor can't. Returns 0 on success, -1 on failure. More... | |
virtual int | register_senders (void) |
Register the sender for this device (by default, the name of the device). Return 0 on success, -1 on fail. More... | |
![]() | |
int | register_autodeleted_handler (vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER) |
Registers a handler with the connection, and remembers to delete at destruction. More... | |
int | send_text_message (const char *msg, struct timeval timestamp, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0) |
Sends a NULL-terminated text message from the device d_sender_id. More... | |
SendTextMessageBoundCall | send_text_message (vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL) |
Returns an object you can stream into to send a text message from the device like send_text_message(vrpn_TEXT_WARNING) << "Value of i is: " << i; This use requires including vrpn_SendTextMessageStreamProxy.h. More... | |
void | server_mainloop (void) |
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should be called by all servers in their mainloop() More... | |
void | client_mainloop (void) |
Handles functions that all clients should provide in their mainloop() (warning of no server, for example) Should be called by all clients in their mainloop() More... | |
Definition at line 156 of file vrpn_Imager.h.
vrpn_Imager_Server::vrpn_Imager_Server | ( | const char * | name, |
vrpn_Connection * | c, | ||
vrpn_int32 | nCols, | ||
vrpn_int32 | nRows, | ||
vrpn_int32 | nDepth = 1 |
||
) |
Definition at line 47 of file vrpn_Imager.C.
References vrpn_BaseClassUnique::d_connection, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_BaseClassUnique::d_ping_message_id, vrpn_BaseClassUnique::d_sender_id, vrpn_Imager::d_throttle_frames_m_id, handle_last_drop_message(), handle_ping_message(), handle_throttle_message(), vrpn_Imager::nCols(), vrpn_Imager::nDepth(), vrpn_Imager::nRows(), vrpn_BaseClassUnique::register_autodeleted_handler(), vrpn_Connection::register_message_type(), vrpn_ANY_SENDER, vrpn_dropped_last_connection, and vrpn_got_connection.
int vrpn_Imager_Server::add_channel | ( | const char * | name, |
const char * | units = "unsigned8bit" , |
||
vrpn_float32 | minVal = 0 , |
||
vrpn_float32 | maxVal = 255 , |
||
vrpn_float32 | scale = 1 , |
||
vrpn_float32 | offset = 0 |
||
) |
Add a channel to the server, returns index of the channel or -1 on failure.
Definition at line 81 of file vrpn_Imager.C.
|
staticprotected |
Definition at line 1149 of file vrpn_Imager.C.
References d_dropped_due_to_throttle, d_frames_to_send, and vrpn_BaseClassUnique::userdata.
Referenced by vrpn_Imager_Server().
|
staticprotected |
Definition at line 1107 of file vrpn_Imager.C.
References send_description(), and vrpn_BaseClassUnique::userdata.
Referenced by vrpn_Imager_Server().
|
staticprotected |
Definition at line 1114 of file vrpn_Imager.C.
References vrpn_HANDLERPARAM::buffer, d_frames_to_send, vrpn_BaseClassUnique::userdata, and vrpn_unbuffer().
Referenced by vrpn_Imager_Server().
|
virtual |
Handle baseclass ping/pong messages.
Implements vrpn_BaseClass.
Reimplemented in vrpn_Imager_Stream_Buffer.
Definition at line 1105 of file vrpn_Imager.C.
References vrpn_BaseClassUnique::server_mainloop().
bool vrpn_Imager_Server::send_begin_frame | ( | const vrpn_uint16 | cMin, |
const vrpn_uint16 | cMax, | ||
const vrpn_uint16 | rMin, | ||
const vrpn_uint16 | rMax, | ||
const vrpn_uint16 | dMin = 0 , |
||
const vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
Servers must send begin/end frame pairs around contiguous sections of the image.
Definition at line 107 of file vrpn_Imager.C.
References vrpn_Imager::d_begin_frame_m_id, vrpn_BaseClassUnique::d_connection, d_dropped_due_to_throttle, d_frames_to_send, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_BaseClassUnique::d_sender_id, vrpn_Connection::pack_message(), send_discarded_frames(), vrpn_buffer(), vrpn_CONNECTION_RELIABLE, vrpn_CONNECTION_TCP_BUFLEN, and vrpn_gettimeofday.
bool vrpn_Imager_Server::send_description | ( | void | ) |
Sends a description of the imager so the remote can process the region messages.
Definition at line 1045 of file vrpn_Imager.C.
References vrpn_Imager::d_channels, vrpn_BaseClassUnique::d_connection, vrpn_Imager::d_description_m_id, d_description_sent, vrpn_Imager::d_nChannels, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_BaseClassUnique::d_sender_id, vrpn_Connection::pack_message(), vrpn_buffer(), vrpn_CONNECTION_RELIABLE, vrpn_CONNECTION_TCP_BUFLEN, and vrpn_gettimeofday.
Referenced by handle_ping_message(), vrpn_Imager_Stream_Buffer::mainloop(), send_region_using_base_pointer(), and set_resolution().
bool vrpn_Imager_Server::send_discarded_frames | ( | const vrpn_uint16 | count = 0 , |
const struct timeval * | time = NULL |
||
) |
Definition at line 258 of file vrpn_Imager.C.
References vrpn_BaseClassUnique::d_connection, vrpn_Imager::d_discarded_frames_m_id, vrpn_BaseClassUnique::d_sender_id, vrpn_Connection::pack_message(), vrpn_buffer(), vrpn_CONNECTION_RELIABLE, vrpn_CONNECTION_TCP_BUFLEN, and vrpn_gettimeofday.
Referenced by send_begin_frame().
bool vrpn_Imager_Server::send_end_frame | ( | const vrpn_uint16 | cMin, |
const vrpn_uint16 | cMax, | ||
const vrpn_uint16 | rMin, | ||
const vrpn_uint16 | rMax, | ||
const vrpn_uint16 | dMin = 0 , |
||
const vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
Definition at line 190 of file vrpn_Imager.C.
References vrpn_BaseClassUnique::d_connection, d_dropped_due_to_throttle, vrpn_Imager::d_end_frame_m_id, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_BaseClassUnique::d_sender_id, vrpn_Connection::pack_message(), vrpn_buffer(), vrpn_CONNECTION_RELIABLE, vrpn_CONNECTION_TCP_BUFLEN, and vrpn_gettimeofday.
bool vrpn_Imager_Server::send_region_using_base_pointer | ( | vrpn_int16 | chanIndex, |
vrpn_uint16 | cMin, | ||
vrpn_uint16 | cMax, | ||
vrpn_uint16 | rMin, | ||
vrpn_uint16 | rMax, | ||
const vrpn_float32 * | data, | ||
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | dMin = 0 , |
||
vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to).
Chanindex: What channel this region holds data for cMin, cMax: Range of columns to extract from this data set rMin, rMax: Range of rows to extract from this data set data: Points at the (0,0) element of the 2D array that holds the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. colStride, rowStride: Number of elements (size of data type) to skip along a column and row nRows, invert_rows: If invert_rows is true, then nRows must be set to the number of rows in the entire image. If invert_rows is false, then nRows is not used. time: What time the message should have associated with it (NULL pointer for "now")
Definition at line 716 of file vrpn_Imager.C.
References vrpn_Imager::d_channels, d_description_sent, d_dropped_due_to_throttle, vrpn_Imager::d_nChannels, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_Imager_Channel::NONE, vrpn_Imager::nRows(), send_description(), vrpn_buffer(), vrpn_CONNECTION_TCP_BUFLEN, vrpn_gettimeofday, vrpn_IMAGER_MAX_REGIONf32, and vrpn_IMAGER_VALTYPE_FLOAT32.
bool vrpn_Imager_Server::send_region_using_base_pointer | ( | vrpn_int16 | chanIndex, |
vrpn_uint16 | cMin, | ||
vrpn_uint16 | cMax, | ||
vrpn_uint16 | rMin, | ||
vrpn_uint16 | rMax, | ||
const vrpn_uint16 * | data, | ||
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | dMin = 0 , |
||
vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to).
Chanindex: What channel this region holds data for cMin, cMax: Range of columns to extract from this data set rMin, rMax: Range of rows to extract from this data set data: Points at the (0,0) element of the 2D array that holds the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. colStride, rowStride: Number of elements (size of data type) to skip along a column and row nRows, invert_rows: If invert_rows is true, then nRows must be set to the number of rows in the entire image. If invert_rows is false, then nRows is not used. time: What time the message should have associated with it (NULL pointer for "now")
Definition at line 516 of file vrpn_Imager.C.
References vrpn_Imager::d_channels, d_description_sent, d_dropped_due_to_throttle, vrpn_Imager::d_nChannels, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_Imager_Channel::NONE, vrpn_Imager::nRows(), send_description(), vrpn_buffer(), vrpn_CONNECTION_TCP_BUFLEN, vrpn_gettimeofday, vrpn_IMAGER_MAX_REGIONu16, and vrpn_IMAGER_VALTYPE_UINT16.
bool vrpn_Imager_Server::send_region_using_base_pointer | ( | vrpn_int16 | chanIndex, |
vrpn_uint16 | cMin, | ||
vrpn_uint16 | cMax, | ||
vrpn_uint16 | rMin, | ||
vrpn_uint16 | rMax, | ||
const vrpn_uint8 * | data, | ||
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | dMin = 0 , |
||
vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
Pack and send the region as efficiently as possible; strides are in steps of the element being sent.
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to).
Chanindex: What channel this region holds data for cMin, cMax: Range of columns to extract from this data set rMin, rMax: Range of rows to extract from this data set data: Points at the (0,0) element of the 2D array that holds the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. colStride, rowStride, depthStride: Number of elements (size of data type) to skip along a column, row, and depth nRows, invert_rows: If invert_rows is true, then nRows must be set to the number of rows in the entire image. If invert_rows is false, then nRows is not used. time: What time the message should have associated with it (NULL pointer for "now")
Definition at line 320 of file vrpn_Imager.C.
References vrpn_Imager::d_channels, vrpn_BaseClassUnique::d_connection, d_description_sent, d_dropped_due_to_throttle, vrpn_Imager::d_nChannels, vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_Imager::d_regionu8_m_id, vrpn_BaseClassUnique::d_sender_id, vrpn_Imager_Channel::NONE, vrpn_Imager::nRows(), vrpn_Connection::pack_message(), send_description(), vrpn_buffer(), vrpn_CONNECTION_RELIABLE, vrpn_CONNECTION_TCP_BUFLEN, vrpn_gettimeofday, vrpn_IMAGER_MAX_REGIONu8, and vrpn_IMAGER_VALTYPE_UINT8.
Referenced by send_region_using_first_pointer().
bool vrpn_Imager_Server::send_region_using_first_pointer | ( | vrpn_int16 | chanIndex, |
vrpn_uint16 | cMin, | ||
vrpn_uint16 | cMax, | ||
vrpn_uint16 | rMin, | ||
vrpn_uint16 | rMax, | ||
const vrpn_float32 * | data, | ||
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | dMin = 0 , |
||
vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to).
Chanindex: What channel this region holds data for cMin, cMax: Range of columns to extract from this data set rMin, rMax: Range of rows to extract from this data set data: Points at the (cMin, rMin) element of the 2D array that holds the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. colStride, rowStride: Number of elements (size of data type) to skip along a column and row nRows, invert_rows: If invert_rows is true, then nRows must be set to the number of rows in the entire image. If invert_rows is false, then nRows is not used. time: What time the message should have associated with it (NULL pointer for "now")
Definition at line 1017 of file vrpn_Imager.C.
References d_dropped_due_to_throttle, vrpn_Imager::nRows(), and send_region_using_base_pointer().
bool vrpn_Imager_Server::send_region_using_first_pointer | ( | vrpn_int16 | chanIndex, |
vrpn_uint16 | cMin, | ||
vrpn_uint16 | cMax, | ||
vrpn_uint16 | rMin, | ||
vrpn_uint16 | rMax, | ||
const vrpn_uint16 * | data, | ||
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | dMin = 0 , |
||
vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to).
Chanindex: What channel this region holds data for cMin, cMax: Range of columns to extract from this data set rMin, rMax: Range of rows to extract from this data set data: Points at the (cMin, rMin) element of the 2D array that holds the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. colStride, rowStride: Number of elements (size of data type) to skip along a column and row nRows, invert_rows: If invert_rows is true, then nRows must be set to the number of rows in the entire image. If invert_rows is false, then nRows is not used. time: What time the message should have associated with it (NULL pointer for "now")
Definition at line 967 of file vrpn_Imager.C.
References d_dropped_due_to_throttle, vrpn_Imager::nRows(), and send_region_using_base_pointer().
bool vrpn_Imager_Server::send_region_using_first_pointer | ( | vrpn_int16 | chanIndex, |
vrpn_uint16 | cMin, | ||
vrpn_uint16 | cMax, | ||
vrpn_uint16 | rMin, | ||
vrpn_uint16 | rMax, | ||
const vrpn_uint8 * | data, | ||
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | dMin = 0 , |
||
vrpn_uint16 | dMax = 0 , |
||
const struct timeval * | time = NULL |
||
) |
Pack and send the region as efficiently as possible; strides are in steps of the element being sent.
As efficiently as possible, pull the values out of the array whose pointer is passed in and send them over a VRPN connection as a region message that is appropriate for the type that has been passed in (the type that data points to).
Chanindex: What channel this region holds data for cMin, cMax: Range of columns to extract from this data set rMin, rMax: Range of rows to extract from this data set data: Points at the (cMin,rMin) element of the 2D array that holds the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. colStride, rowStride: Number of elements (size of data type) to skip along a column and row nRows, invert_rows: If invert_rows is true, then nRows must be set to the number of rows in the entire image. If invert_rows is false, then nRows is not used. time: What time the message should have associated with it (NULL pointer for "now")
Definition at line 917 of file vrpn_Imager.C.
References d_dropped_due_to_throttle, vrpn_Imager::nRows(), and send_region_using_base_pointer().
bool vrpn_Imager_Server::set_resolution | ( | vrpn_int32 | nCols, |
vrpn_int32 | nRows, | ||
vrpn_int32 | nDepth = 1 |
||
) |
Set the resolution to a different value than it had been before. Returns true on success.
Definition at line 1089 of file vrpn_Imager.C.
References vrpn_Imager::d_nCols, vrpn_Imager::d_nDepth, vrpn_Imager::d_nRows, vrpn_Imager::nCols(), vrpn_Imager::nDepth(), vrpn_Imager::nRows(), and send_description().
|
protected |
Definition at line 260 of file vrpn_Imager.h.
Referenced by send_description(), and send_region_using_base_pointer().
|
protected |
Definition at line 264 of file vrpn_Imager.h.
Referenced by handle_last_drop_message(), send_begin_frame(), send_end_frame(), send_region_using_base_pointer(), and send_region_using_first_pointer().
|
protected |
Definition at line 261 of file vrpn_Imager.h.
Referenced by handle_last_drop_message(), handle_throttle_message(), and send_begin_frame().