CTR Pia  4.11.3
Game Communication Engine
nn::pia::clone::CloneElementBase Class Reference

This is the base class for managing data that is sent and received.
. More...

+ Inheritance diagram for nn::pia::clone::CloneElementBase:

Public Types

typedef u16 Id
 Specifies the type of the ID for identifying clone elements.
 

Public Member Functions

virtual ~CloneElementBase ()
 Destroys the object.
 
const CloneBaseGetCloneBase () const
 Gets the CloneBase this object is registered to. More...
 
Id GetId () const
 Gets the ID. More...
 
const CloneProtocolGetProtocol () const
 Gets the CloneProtocol of the CloneBase this object is registered to. More...
 
bool IsReadyToSetValue () const
 Determines whether a value can be set. More...
 
bool IsRegisteredWithCloneBase () const
 Determines whether the object is registered with CloneBase. More...
 
bool IsRegisteredWithProtocol () const
 Determines whether the object is registered with CloneProtocol. More...
 
Profiling
nn::Result SetProfiler (CloneProfilerBase *pSendProfiler, CloneProfilerBase *pReceiveProfiler)
 Sets an object to manage send/receive profiling. More...
 
const CloneProfilerBaseGetSendProfiler () const
 Gets the object configured to manage send profiling. More...
 
const CloneProfilerBaseGetReceiveProfiler () const
 Gets the object configured to manage receive profiling. More...
 
void ResetProfiler ()
 Resets the results of send/receive profiling. More...
 
u32 GetProfiledLatestSendCount (StationIndex stationIndex) const
 Gets the send count for the last CloneProfiler::LATEST_BUFFER_SIZE times common::Scheduler::Dispatch was called. More...
 
u32 GetProfiledLatestSendSize (StationIndex stationIndex) const
 Gets the total amount of data, in bytes, sent during the last CloneProfiler::LATEST_BUFFER_SIZE times of common::Scheduler::Dispatch being called. More...
 
u32 GetProfiledTotalSendCount (StationIndex stationIndex) const
 Gets the number of times sent since ResetProfiler was called. More...
 
u32 GetProfiledTotalSendSize (StationIndex stationIndex) const
 Gets the amount of data, in bytes, sent since ResetProfiler was called. More...
 
u32 GetProfiledLatestReceiveCount (StationIndex stationIndex) const
 Gets the receive count for the last CloneProfiler::LATEST_BUFFER_SIZE times common::Scheduler::Dispatch was called. More...
 
u32 GetProfiledLatestReceiveSize (StationIndex stationIndex) const
 Gets the total amount of data, in bytes, received during the last CloneProfiler::LATEST_BUFFER_SIZE times of common::Scheduler::Dispatch being called. More...
 
u32 GetProfiledTotalReceiveCount (StationIndex stationIndex) const
 Gets the number of times received since ResetProfiler was called. More...
 
u32 GetProfiledTotalReceiveSize (StationIndex stationIndex) const
 Gets the amount of data, in bytes, received since ResetProfiler was called. More...
 

Detailed Description

This is the base class for managing data that is sent and received.
.

Revision History:

2013-11-25 Added a profiling feature.

2013-07-18 Initial version.

Member Function Documentation

const CloneBase* nn::pia::clone::CloneElementBase::GetCloneBase ( ) const
inline

Gets the CloneBase this object is registered to.

Returns
Returns the CloneBase this object is registered to.
Id nn::pia::clone::CloneElementBase::GetId ( ) const
inline

Gets the ID.

Returns
Returns the ID specified when registering the object with CloneBase. Returns 0 if the object is not registered with CloneBase. (If 0 was specified as the ID when registering the object, 0 may be returned as a valid value.)
u32 nn::pia::clone::CloneElementBase::GetProfiledLatestReceiveCount ( StationIndex  stationIndex) const

Gets the receive count for the last CloneProfiler::LATEST_BUFFER_SIZE times common::Scheduler::Dispatch was called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The receive count for the last CloneProfiler::LATEST_BUFFER_SIZE times common::Scheduler::Dispatch was called. Returns 0 if no object is configured to manage receive profiling.
See also
SetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledLatestReceiveSize ( StationIndex  stationIndex) const

Gets the total amount of data, in bytes, received during the last CloneProfiler::LATEST_BUFFER_SIZE times of common::Scheduler::Dispatch being called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The total amount of data, in bytes, received during the last CloneProfiler::LATEST_BUFFER_SIZE times of common::Scheduler::Dispatch being called. Returns 0 if no object is configured to manage receive profiling.
See also
SetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledLatestSendCount ( StationIndex  stationIndex) const

Gets the send count for the last CloneProfiler::LATEST_BUFFER_SIZE times common::Scheduler::Dispatch was called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The send count for the last CloneProfiler::LATEST_BUFFER_SIZE times common::Scheduler::Dispatch was called. Returns 0 if no object is configured to manage send profiling.
See also
SetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledLatestSendSize ( StationIndex  stationIndex) const

Gets the total amount of data, in bytes, sent during the last CloneProfiler::LATEST_BUFFER_SIZE times of common::Scheduler::Dispatch being called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The total amount of data, in bytes, sent during the last CloneProfiler::LATEST_BUFFER_SIZE times of common::Scheduler::Dispatch being called. Returns 0 if no object is configured to manage send profiling.
See also
SetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledTotalReceiveCount ( StationIndex  stationIndex) const

Gets the number of times received since ResetProfiler was called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The number of times received since ResetProfiler was called. Returns 0 if no object is configured to manage receive profiling.
See also
SetProfiler, ResetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledTotalReceiveSize ( StationIndex  stationIndex) const

Gets the amount of data, in bytes, received since ResetProfiler was called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The amount of data, in bytes, received since ResetProfiler was called. Returns 0 if no object is configured to manage receive profiling.
See also
SetProfiler, ResetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledTotalSendCount ( StationIndex  stationIndex) const

Gets the number of times sent since ResetProfiler was called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The number of times sent since ResetProfiler was called. Returns 0 if no object is configured to manage send profiling.
See also
SetProfiler, ResetProfiler
u32 nn::pia::clone::CloneElementBase::GetProfiledTotalSendSize ( StationIndex  stationIndex) const

Gets the amount of data, in bytes, sent since ResetProfiler was called.

Parameters
[in]stationIndexThe StationIndex that is subject to profiling.
Returns
The amount of data, in bytes, sent since ResetProfiler was called. Returns 0 if no object is configured to manage send profiling.
See also
SetProfiler, ResetProfiler
const CloneProtocol* nn::pia::clone::CloneElementBase::GetProtocol ( ) const

Gets the CloneProtocol of the CloneBase this object is registered to.

Returns
Returns the CloneProtocol of the CloneBase this object is registered to.
const CloneProfilerBase* nn::pia::clone::CloneElementBase::GetReceiveProfiler ( ) const
inline

Gets the object configured to manage receive profiling.

Returns
The object configured to manage receive profiling. Returns NULL if nothing has been set.
See also
SetProfiler
const CloneProfilerBase* nn::pia::clone::CloneElementBase::GetSendProfiler ( ) const
inline

Gets the object configured to manage send profiling.

Returns
The object configured to manage send profiling. Returns NULL if nothing has been set.
See also
SetProfiler
bool nn::pia::clone::CloneElementBase::IsReadyToSetValue ( ) const

Determines whether a value can be set.

Returns
Returns true if a value can be set.
bool nn::pia::clone::CloneElementBase::IsRegisteredWithCloneBase ( ) const
inline

Determines whether the object is registered with CloneBase.

Returns
Returns true if it is registered with CloneBase.
bool nn::pia::clone::CloneElementBase::IsRegisteredWithProtocol ( ) const

Determines whether the object is registered with CloneProtocol.

Returns
Returns true if it is registered with CloneProtocol.
void nn::pia::clone::CloneElementBase::ResetProfiler ( )

Resets the results of send/receive profiling.

See also
SetProfiler
nn::Result nn::pia::clone::CloneElementBase::SetProfiler ( CloneProfilerBase pSendProfiler,
CloneProfilerBase pReceiveProfiler 
)

Sets an object to manage send/receive profiling.

Clone element send/receive tasks can be profiled by configuring CloneProfiler. This calculation includes all exchanges of data between this clone element and other clone elements, so the data exchanges between clone elements on the local station are also included in the value.

Even when compression is enabled, the uncompressed size is used in the calculation.

A CloneProfiler instance that is already configured can be released by specifying NULL in the arguments.

Parameters
[in]pSendProfilerSpecifies the CloneProfiler that manages the send profiling. Specify NULL if not necessary.
[in]pReceiveProfilerSpecifies the CloneProfiler that manages the receive profiling. Specify NULL if not necessary.
Returns
Returns a Result value for which the IsSuccess function returns true if execution succeeds. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:
ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.