Commit 8a8dc1d4 authored by Éric Thiébaut's avatar Éric Thiébaut
Browse files

Adjust TAO_OWNER_SIZE and move private definitions

- size of tao_remote_object is a multiple of 64 bytes;
- private definitions moved from <tao-remote-objects.h> to
  <tao-remote-objects-private.h>;
parent 4f9842d3
......@@ -17,6 +17,12 @@
TAO_BEGIN_DECLS
/**
* @ingroup RemoteObjects
*
* @{
*/
/**
* Report command timeout when server killed?
*
......@@ -32,16 +38,40 @@ TAO_BEGIN_DECLS
* a TAO shared object used to communicate with a remote server.
*/
struct tao_remote_object_ {
tao_shared_object base;///< Base structure.
const long nbufs;///< Number of output buffers.
const long offset;///< Offset to first frame (in bytes).
const long stride;///< Stride between successive frames (in bytes).
tao_atomic tao_serial serial;///< Serial number of last data-frame.
tao_atomic tao_state state;///< Current state.
tao_command command;///< Pending command.
tao_shared_object base;///< Base structure.
const long nbufs;///< Number of output buffers.
const long offset;///< Offset to first frame (in bytes).
const long stride;///< Stride between successive frames (in bytes).
tao_atomic
tao_serial serial;///< Serial number of last data-frame.
tao_atomic
tao_state state;///< Current state.
tao_command command;///< Pending command.
const char owner[TAO_OWNER_SIZE];///< Server name.
};
/**
* @typedef tao_dataframe_header
*
* @brief Data-frame descriptor as written in shared memory.
*
* This structure is the header of each data-frame as stored in shared memory
* in a @ref tao_remote_mirror or @ref tao_remote_sensor. It is followed
* (perhaps after some padding bytes to preserve alignment) by the data values.
*
* The end-user shall not directly deal with instances of this structure but
* shall use @ref tao_dataframe_info instead.
*/
typedef struct tao_dataframe_header_ {
tao_atomic tao_serial serial; ///< Serial number.
tao_serial mark; ///< User-defined mark.
tao_time time; ///< Time-stamp.
} tao_dataframe_header;
/**
* @}
*/
TAO_END_DECLS
#endif // TAO_REMOTE_OBJECTS_PRIVATE_H_
......@@ -77,10 +77,10 @@ extern const char* tao_state_get_name(
*
* The number of bytes (including the final null) for the name of the owner of
* a shared object. Note: for Linux, this size has been adjusted so that the
* size of the `tao_shared_object` structure is a multiple of 64 bytes so that
* size of the `tao_remote_object` structure is a multiple of 64 bytes so that
* no space is lost due to alignement.
*/
#define TAO_OWNER_SIZE 36
#define TAO_OWNER_SIZE 96
/**
* @brief Opaque structure for a remote shared object.
......@@ -93,24 +93,6 @@ extern const char* tao_state_get_name(
*/
typedef struct tao_remote_object_ tao_remote_object;
/**
* @typedef tao_dataframe_header
*
* @brief Data-frame descriptor as written in shared memory.
*
* This structure is the header of each data-frame as stored in shared memory
* in a @ref tao_remote_mirror or @ref tao_remote_sensor. It is followed
* (perhaps after some padding bytes to preserve alignment) by the data values.
*
* The end-user shall not directly deal with instances of this structure but
* shall use @ref tao_dataframe_info instead.
*/
typedef struct tao_dataframe_header_ {
tao_atomic tao_serial serial; ///< Serial number.
tao_serial mark; ///< User-defined mark.
tao_time time; ///< Time-stamp.
} tao_dataframe_header;
/**
* @typedef tao_dataframe_info
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment