AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
AJADebug Class Reference

#include <debug.h>

Public Member Functions

 AJADebug ()
 
virtual ~AJADebug ()
 

Static Public Member Functions

static uint32_t Version (void)
 
static uint32_t TotalBytes (void)
 
static AJAStatus Open (bool incrementRefCount=false)
 
static AJAStatus Close (bool decrementRefCount=false)
 
static AJAStatus Enable (int32_t index, uint32_t destination=AJA_DEBUG_DESTINATION_NONE)
 
static AJAStatus Disable (int32_t index, uint32_t destination=AJA_DEBUG_DESTINATION_NONE)
 
static AJAStatus SetDestination (int32_t index, uint32_t destination=AJA_DEBUG_DESTINATION_NONE)
 
static AJAStatus GetDestination (const int32_t inGroup, uint32_t &outDestination)
 
static bool IsActive (int32_t index)
 
static bool IsOpen (void)
 
static bool IsDebugBuild (void)
 
static void Report (int32_t index, int32_t severity, const char *pFileName, int32_t lineNumber,...)
 
static void Report (int32_t index, int32_t severity, const char *pFileName, int32_t lineNumber, const std::string &message)
 
static void AssertWithMessage (const char *pFileName, int32_t lineNumber, const std::string &pExpression)
 
static uint32_t MessageRingCapacity (void)
 
static AJAStatus GetClientReferenceCount (int32_t &outRefCount)
 
static AJAStatus SetClientReferenceCount (int32_t refCount)
 
static AJAStatus GetSequenceNumber (uint64_t &outSequenceNumber)
 
static AJAStatus GetMessageSequenceNumber (const uint64_t sequenceNumber, uint64_t &outSequenceNumber)
 
static AJAStatus GetMessageGroup (const uint64_t sequenceNumber, int32_t &outGroupIndex)
 
static AJAStatus GetMessageDestination (const uint64_t sequenceNumber, uint32_t &outDestination)
 
static AJAStatus GetMessageTime (const uint64_t sequenceNumber, uint64_t &outTime)
 
static AJAStatus GetMessageWallClockTime (const uint64_t sequenceNumber, int64_t &outTime)
 
static AJAStatus GetMessageFileName (const uint64_t sequenceNumber, std::string &outFileName)
 
static AJAStatus GetMessageLineNumber (const uint64_t sequenceNumber, int32_t &outLineNumber)
 
static AJAStatus GetMessageSeverity (const uint64_t sequenceNumber, int32_t &outSeverity)
 
static AJAStatus GetMessageText (const uint64_t sequenceNumber, std::string &outMessage)
 
static AJAStatus GetProcessId (const uint64_t sequenceNumber, uint64_t &outPid)
 
static AJAStatus GetThreadId (const uint64_t sequenceNumber, uint64_t &outTid)
 
static AJAStatus GetMessagesAccepted (uint64_t &outCount)
 
static AJAStatus GetMessagesIgnored (uint64_t &outCount)
 
static const std::string & SeverityName (const int32_t severity)
 
static const std::string & GroupName (const int32_t group)
 
static AJAStatus SaveState (const std::string &inFilePath)
 
static AJAStatus RestoreState (const std::string &inFilePath)
 
static uint32_t StatsCapacity (void)
 
static bool HasStats (void)
 
static AJAStatus StatAllocate (const uint32_t inKey)
 
static AJAStatus StatFree (const uint32_t inKey)
 
static bool StatIsAllocated (const uint32_t inKey)
 
static AJAStatus StatReset (const uint32_t inKey)
 
static AJAStatus StatTimerStart (const uint32_t inKey)
 
static AJAStatus StatTimerStop (const uint32_t inKey)
 
static AJAStatus StatCounterIncrement (const uint32_t inKey, const uint32_t inIncrement=1)
 
static AJAStatus StatSetValue (const uint32_t inKey, const uint32_t inValue)
 
static AJAStatus StatGetInfo (const uint32_t inKey, AJADebugStat &outInfo)
 
static AJAStatus StatGetKeys (std::vector< uint32_t > &outKeys, uint32_t &outSeqNum)
 
static AJAStatus StatGetKeys (std::set< uint32_t > &outKeys, uint32_t &outSeqNum)
 
static AJAStatus StatGetSequenceNum (uint32_t &outSeqNum)
 
static int64_t DebugTime (void)
 
static const char * GetSeverityString (int32_t severity)
 
static const char * GetGroupString (int32_t group)
 
static AJAStatus GetDestination (int32_t index, uint32_t *pDestination)
 
static AJAStatus GetClientReferenceCount (int32_t *pRefCount)
 
static AJAStatus GetSequenceNumber (uint64_t *pSequenceNumber)
 
static AJAStatus GetMessageSequenceNumber (uint64_t sequenceNumber, uint64_t *pSequenceNumber)
 
static AJAStatus GetMessageGroup (uint64_t sequenceNumber, int32_t *pGroupIndex)
 
static AJAStatus GetMessageDestination (uint64_t sequenceNumber, uint32_t *pDestination)
 
static AJAStatus GetMessageTime (uint64_t sequenceNumber, uint64_t *pTime)
 
static AJAStatus GetMessageWallClockTime (uint64_t sequenceNumber, int64_t *pTime)
 
static AJAStatus GetMessageFileName (uint64_t sequenceNumber, const char **ppFileName)
 
static AJAStatus GetMessageLineNumber (uint64_t sequenceNumber, int32_t *pLineNumber)
 
static AJAStatus GetMessageSeverity (uint64_t sequenceNumber, int32_t *pSeverity)
 
static AJAStatus GetMessageText (uint64_t sequenceNumber, const char **ppMessage)
 
static AJAStatus GetProcessId (uint64_t sequenceNumber, uint64_t *pPid)
 
static AJAStatus GetThreadId (uint64_t sequenceNumber, uint64_t *pTid)
 
static AJAStatus GetMessagesAccepted (uint64_t *pCount)
 
static AJAStatus GetMessagesIgnored (uint64_t *pCount)
 
static void * GetPrivateDataLoc (void)
 
static size_t GetPrivateDataLen (void)
 

Detailed Description

Debug class to generate debug output and assertions.

Definition at line 243 of file debug.h.

Constructor & Destructor Documentation

◆ AJADebug()

AJADebug::AJADebug ( )
inline

Definition at line 247 of file debug.h.

◆ ~AJADebug()

virtual AJADebug::~AJADebug ( )
inlinevirtual

Definition at line 248 of file debug.h.

Member Function Documentation

◆ AssertWithMessage()

void AJADebug::AssertWithMessage ( const char *  pFileName,
int32_t  lineNumber,
const std::string &  pExpression 
)
static

Assert that an unexpected error has occurred.

Parameters
[in]pFileNameThe source file name reporting the assertion.
[in]lineNumberThe line number in the source file reporting the assertion.
[in]pExpressionExpression that caused the assertion.

Definition at line 446 of file debug.cpp.

◆ Close()

AJAStatus AJADebug::Close ( bool  decrementRefCount = false)
static

Release resources used by the debug system.

Invoke before application terminates.

Parameters
[in]decrementRefCountIf true will decrement the ref count in the shared memory, NOTE that this should only be true when used in something that is processing the log messages, like ajalogger.
Returns
AJA_STATUS_SUCCESS Debug system closed AJA_STATUS_FAIL Close failed

Definition at line 195 of file debug.cpp.

◆ DebugTime()

int64_t AJADebug::DebugTime ( void  )
static

Get the current time at the debug rate.

Returns
The current time in debug ticks.

Definition at line 973 of file debug.cpp.

◆ Disable()

AJAStatus AJADebug::Disable ( int32_t  index,
uint32_t  destination = AJA_DEBUG_DESTINATION_NONE 
)
static

Disable delivery of messages to the destination index.

Parameters
[in]indexSpecify the message destinations for this group index.
[in]destinationBit array of message destinations (AJA_DEBUG_DESTINATION).
Returns
AJA_STATUS_SUCCESS Destination disabled AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range

Definition at line 232 of file debug.cpp.

◆ Enable()

AJAStatus AJADebug::Enable ( int32_t  index,
uint32_t  destination = AJA_DEBUG_DESTINATION_NONE 
)
static

Enable delivery of messages to the destination index.

Parameters
[in]indexSpecify the message destinations for this group index.
[in]destinationBit array of message destinations (AJA_DEBUG_DESTINATION).
Returns
AJA_STATUS_SUCCESS Destination enabled AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range

Definition at line 222 of file debug.cpp.

◆ GetClientReferenceCount() [1/2]

AJAStatus AJADebug::GetClientReferenceCount ( int32_t &  outRefCount)
static

Get the reference count for the number of clients accessing shared debug info

Parameters
[out]outRefCountReceives the current client reference count.
Returns
AJA_STATUS_SUCCESS Reference count returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 513 of file debug.cpp.

◆ GetClientReferenceCount() [2/2]

static AJAStatus AJADebug::GetClientReferenceCount ( int32_t *  pRefCount)
inlinestatic

Definition at line 730 of file debug.h.

◆ GetDestination() [1/2]

AJAStatus AJADebug::GetDestination ( const int32_t  inGroup,
uint32_t &  outDestination 
)
static

Get the destination associated with a debug group.

Parameters
[in]inGroupIndex of the group destination to return.
[out]outDestinationReceives the current destination
Returns
AJA_STATUS_SUCCESS Destination disabled AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 260 of file debug.cpp.

◆ GetDestination() [2/2]

static AJAStatus AJADebug::GetDestination ( int32_t  index,
uint32_t *  pDestination 
)
inlinestatic

Definition at line 729 of file debug.h.

◆ GetGroupString()

const char * AJADebug::GetGroupString ( int32_t  group)
static

Definition at line 850 of file debug.cpp.

◆ GetMessageDestination() [1/2]

AJAStatus AJADebug::GetMessageDestination ( const uint64_t  sequenceNumber,
uint32_t &  outDestination 
)
static

Get the destination of the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outDestinationReceives the destination of the message.
Returns
AJA_STATUS_SUCCESS Destination returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 603 of file debug.cpp.

◆ GetMessageDestination() [2/2]

static AJAStatus AJADebug::GetMessageDestination ( uint64_t  sequenceNumber,
uint32_t *  pDestination 
)
inlinestatic

Definition at line 734 of file debug.h.

◆ GetMessageFileName() [1/2]

AJAStatus AJADebug::GetMessageFileName ( const uint64_t  sequenceNumber,
std::string &  outFileName 
)
static

Get the source file name that reported the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outFileNameReceives the source file name that reported the message.
Returns
AJA_STATUS_SUCCESS Message file name returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 655 of file debug.cpp.

◆ GetMessageFileName() [2/2]

AJAStatus AJADebug::GetMessageFileName ( uint64_t  sequenceNumber,
const char **  ppFileName 
)
static

Definition at line 673 of file debug.cpp.

◆ GetMessageGroup() [1/2]

AJAStatus AJADebug::GetMessageGroup ( const uint64_t  sequenceNumber,
int32_t &  outGroupIndex 
)
static

Get the group index that reported the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outGroupIndexReceives the group that reported the message.
Returns
AJA_STATUS_SUCCESS Group index returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 585 of file debug.cpp.

◆ GetMessageGroup() [2/2]

static AJAStatus AJADebug::GetMessageGroup ( uint64_t  sequenceNumber,
int32_t *  pGroupIndex 
)
inlinestatic

Definition at line 733 of file debug.h.

◆ GetMessageLineNumber() [1/2]

AJAStatus AJADebug::GetMessageLineNumber ( const uint64_t  sequenceNumber,
int32_t &  outLineNumber 
)
static

Get the source line number that reported the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outLineNumberReceives the source line number that reported the message.
Returns
AJA_STATUS_SUCCESS Sequence number returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 693 of file debug.cpp.

◆ GetMessageLineNumber() [2/2]

static AJAStatus AJADebug::GetMessageLineNumber ( uint64_t  sequenceNumber,
int32_t *  pLineNumber 
)
inlinestatic

Definition at line 738 of file debug.h.

◆ GetMessagesAccepted() [1/2]

AJAStatus AJADebug::GetMessagesAccepted ( uint64_t &  outCount)
static

Get the number of messages accepted into the ring since creation.

Parameters
[out]outCountReceives the number of messages
Returns
AJA_STATUS_SUCCESS Number of messages returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 803 of file debug.cpp.

◆ GetMessagesAccepted() [2/2]

static AJAStatus AJADebug::GetMessagesAccepted ( uint64_t *  pCount)
inlinestatic

Definition at line 743 of file debug.h.

◆ GetMessageSequenceNumber() [1/2]

AJAStatus AJADebug::GetMessageSequenceNumber ( const uint64_t  sequenceNumber,
uint64_t &  outSequenceNumber 
)
static

Get the sequence number recorded in the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outSequenceNumberReceives the sequence number recorded in the message.
Returns
AJA_STATUS_SUCCESS Group index returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 567 of file debug.cpp.

◆ GetMessageSequenceNumber() [2/2]

static AJAStatus AJADebug::GetMessageSequenceNumber ( uint64_t  sequenceNumber,
uint64_t *  pSequenceNumber 
)
inlinestatic

Definition at line 732 of file debug.h.

◆ GetMessageSeverity() [1/2]

AJAStatus AJADebug::GetMessageSeverity ( const uint64_t  sequenceNumber,
int32_t &  outSeverity 
)
static

Get the severity of the reported message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outSeverityReceives the severity of the reported message.
Returns
AJA_STATUS_SUCCESS Message severity returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 711 of file debug.cpp.

◆ GetMessageSeverity() [2/2]

static AJAStatus AJADebug::GetMessageSeverity ( uint64_t  sequenceNumber,
int32_t *  pSeverity 
)
inlinestatic

Definition at line 739 of file debug.h.

◆ GetMessagesIgnored() [1/2]

AJAStatus AJADebug::GetMessagesIgnored ( uint64_t &  outCount)
static

Get the number of messages ignored and not put into the ring since creation.

Parameters
[out]outCountReceives the number of messages
Returns
AJA_STATUS_SUCCESS Number of messages returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 819 of file debug.cpp.

◆ GetMessagesIgnored() [2/2]

static AJAStatus AJADebug::GetMessagesIgnored ( uint64_t *  pCount)
inlinestatic

Definition at line 744 of file debug.h.

◆ GetMessageText() [1/2]

AJAStatus AJADebug::GetMessageText ( const uint64_t  sequenceNumber,
std::string &  outMessage 
)
static

Get the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outMessageReceives the message text
Returns
AJA_STATUS_SUCCESS Message text returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 729 of file debug.cpp.

◆ GetMessageText() [2/2]

AJAStatus AJADebug::GetMessageText ( uint64_t  sequenceNumber,
const char **  ppMessage 
)
static

Definition at line 747 of file debug.cpp.

◆ GetMessageTime() [1/2]

AJAStatus AJADebug::GetMessageTime ( const uint64_t  sequenceNumber,
uint64_t &  outTime 
)
static

Get the time the message was reported.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outTimeReceives the time the message was reported.
Returns
AJA_STATUS_SUCCESS message time returned AJA_STATUS_OPEN debug system not open AJA_STATUS_RANGE index out of range AJA_STATUS_NULL null output pointer

Definition at line 621 of file debug.cpp.

◆ GetMessageTime() [2/2]

static AJAStatus AJADebug::GetMessageTime ( uint64_t  sequenceNumber,
uint64_t *  pTime 
)
inlinestatic

Definition at line 735 of file debug.h.

◆ GetMessageWallClockTime() [1/2]

AJAStatus AJADebug::GetMessageWallClockTime ( const uint64_t  sequenceNumber,
int64_t &  outTime 
)
static

Get the wall clock time the message was reported.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outTimeReceives the wall clock time the message was reported, as returned from time()
Returns
AJA_STATUS_SUCCESS message time returned AJA_STATUS_OPEN debug system not open AJA_STATUS_RANGE index out of range AJA_STATUS_NULL null output pointer

Definition at line 638 of file debug.cpp.

◆ GetMessageWallClockTime() [2/2]

static AJAStatus AJADebug::GetMessageWallClockTime ( uint64_t  sequenceNumber,
int64_t *  pTime 
)
inlinestatic

Definition at line 736 of file debug.h.

◆ GetPrivateDataLen()

size_t AJADebug::GetPrivateDataLen ( void  )
static

Definition at line 1035 of file debug.cpp.

◆ GetPrivateDataLoc()

void * AJADebug::GetPrivateDataLoc ( void  )
static

Definition at line 1026 of file debug.cpp.

◆ GetProcessId() [1/2]

AJAStatus AJADebug::GetProcessId ( const uint64_t  sequenceNumber,
uint64_t &  outPid 
)
static

Get the Process Id that reported the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outPidProcess Id that reported the message.
Returns
AJA_STATUS_SUCCESS message time returned AJA_STATUS_OPEN debug system not open AJA_STATUS_RANGE index out of range AJA_STATUS_NULL null output pointer

Definition at line 767 of file debug.cpp.

◆ GetProcessId() [2/2]

static AJAStatus AJADebug::GetProcessId ( uint64_t  sequenceNumber,
uint64_t *  pPid 
)
inlinestatic

Definition at line 741 of file debug.h.

◆ GetSequenceNumber() [1/2]

AJAStatus AJADebug::GetSequenceNumber ( uint64_t &  outSequenceNumber)
static

Get the sequence number of the latest message

Parameters
[out]outSequenceNumberReceives the current sequence number.
Returns
AJA_STATUS_SUCCESS Sequence number returned AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range AJA_STATUS_NULL Null output pointer

Definition at line 551 of file debug.cpp.

◆ GetSequenceNumber() [2/2]

static AJAStatus AJADebug::GetSequenceNumber ( uint64_t *  pSequenceNumber)
inlinestatic

Definition at line 731 of file debug.h.

◆ GetSeverityString()

const char * AJADebug::GetSeverityString ( int32_t  severity)
static

Definition at line 835 of file debug.cpp.

◆ GetThreadId() [1/2]

AJAStatus AJADebug::GetThreadId ( const uint64_t  sequenceNumber,
uint64_t &  outTid 
)
static

Get the Thread Id that reported the message.

Parameters
[in]sequenceNumberSequence number of the message.
[out]outTidReceives the thread Id that reported the message.
Returns
AJA_STATUS_SUCCESS message time returned AJA_STATUS_OPEN debug system not open AJA_STATUS_RANGE index out of range AJA_STATUS_NULL null output pointer

Definition at line 785 of file debug.cpp.

◆ GetThreadId() [2/2]

static AJAStatus AJADebug::GetThreadId ( uint64_t  sequenceNumber,
uint64_t *  pTid 
)
inlinestatic

Definition at line 742 of file debug.h.

◆ GroupName()

const std::string & AJADebug::GroupName ( const int32_t  group)
static
Parameters
[in]groupThe Message Group of interest.
Returns
A human-readable string containing the name associated with the given Message Group.

Definition at line 860 of file debug.cpp.

◆ HasStats()

bool AJADebug::HasStats ( void  )
static
Returns
True if stats are supported; otherwise false.

Definition at line 1051 of file debug.cpp.

◆ IsActive()

bool AJADebug::IsActive ( int32_t  index)
static
Parameters
[in]indexThe destination index of interest.
Returns
True if the debug facility is open, and the destination index is valid and active; otherwise false.

Definition at line 278 of file debug.cpp.

◆ IsDebugBuild()

bool AJADebug::IsDebugBuild ( void  )
static
Returns
True if this class was built with AJA_DEBUG defined; otherwise false.

Definition at line 318 of file debug.cpp.

◆ IsOpen()

bool AJADebug::IsOpen ( void  )
static
Returns
True if the debug facility is open; otherwise false.

Definition at line 312 of file debug.cpp.

◆ MessageRingCapacity()

uint32_t AJADebug::MessageRingCapacity ( void  )
static
Returns
The capacity of the debug logging facility's message ring.

Definition at line 505 of file debug.cpp.

◆ Open()

AJAStatus AJADebug::Open ( bool  incrementRefCount = false)
static

Initialize the debug system.

Invoke before reporting debug messages.

Parameters
[in]incrementRefCountIf true will increment the ref count in the shared memory, NOTE that this should only be true when used in something that is processing the log messages, like ajalogger.
Returns
AJA_STATUS_SUCCESS Debug system initialized AJA_STATUS_FAIL Initialization failed

Definition at line 44 of file debug.cpp.

◆ Report() [1/2]

void AJADebug::Report ( int32_t  index,
int32_t  severity,
const char *  pFileName,
int32_t  lineNumber,
const std::string &  message 
)
static

Report debug message to the specified destination index.

Parameters
[in]indexReport the message to this destination index.
[in]severitySeverity (::AJA_DEBUG_SEVERITY) of the message to report.
[in]pFileNameThe source filename reporting the message.
[in]lineNumberThe line number in the source file reporting the message.
[in]messageThe message to report.

Definition at line 423 of file debug.cpp.

◆ Report() [2/2]

void AJADebug::Report ( int32_t  index,
int32_t  severity,
const char *  pFileName,
int32_t  lineNumber,
  ... 
)
static

Report debug message to the specified destination index.

Parameters
[in]indexReport the message to this destination index.
[in]severitySeverity (::AJA_DEBUG_SEVERITY) of the message to report.
[in]pFileNameThe source filename reporting the message.
[in]lineNumberThe line number in the source file reporting the message.
[in]...Format parameters to be passed to vsprintf. The first is the format itself.

Definition at line 388 of file debug.cpp.

◆ RestoreState()

AJAStatus AJADebug::RestoreState ( const std::string &  inFilePath)
static

Read group state from a text file.

Parameters
[in]inFilePathThe group state file path.
Returns
AJA_STATUS_SUCCESS State restored AJA_STATUS_OPEN Debug system not open AJA_STATUS_NULL Null output pointer

Definition at line 908 of file debug.cpp.

◆ SaveState()

AJAStatus AJADebug::SaveState ( const std::string &  inFilePath)
static

Write group state to a text file.

Parameters
[in]inFilePathThe group state file path.
Returns
AJA_STATUS_SUCCESS State saved AJA_STATUS_OPEN Debug system not open AJA_STATUS_NULL Null output pointer

Definition at line 872 of file debug.cpp.

◆ SetClientReferenceCount()

AJAStatus AJADebug::SetClientReferenceCount ( int32_t  refCount)
static

Set the reference count for the number of clients accessing shared debug info NOTE: in normal circumstances this should never be used, if set to 0 or less the debug system will be closed (shared memory cleaned up)

Parameters
[in]refCountThe client reference count to set.
Returns
AJA_STATUS_SUCCESS Reference count set AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range

Definition at line 530 of file debug.cpp.

◆ SetDestination()

AJAStatus AJADebug::SetDestination ( int32_t  index,
uint32_t  destination = AJA_DEBUG_DESTINATION_NONE 
)
static

Enable delivery of messages to the destination index.

Parameters
[in]indexSpecify the message destinations for this index.
[in]destinationBit array of message destinations (AJA_DEBUG_DESTINATION).
Returns
AJA_STATUS_SUCCESS Destination disabled AJA_STATUS_OPEN Debug system not open AJA_STATUS_RANGE Index out of range

Definition at line 242 of file debug.cpp.

◆ SeverityName()

const std::string & AJADebug::SeverityName ( const int32_t  severity)
static
Parameters
[in]severityThe Severity of interest.
Returns
A human-readable string containing the name associated with the given Severity value.

Definition at line 842 of file debug.cpp.

◆ StatAllocate()

AJAStatus AJADebug::StatAllocate ( const uint32_t  inKey)
static

Registers/adds new stat, prepares for first use.

Parameters
[in]inKeyThe timer/counter key to be registered/allocated.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1056 of file debug.cpp.

◆ StatCounterIncrement()

AJAStatus AJADebug::StatCounterIncrement ( const uint32_t  inKey,
const uint32_t  inIncrement = 1 
)
static

Increments the given counter stat.

Parameters
[in]inKeyThe counter of interest.
[in]inIncrementOptionally specifies the increment value. Defaults to 1.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1176 of file debug.cpp.

◆ StatFree()

AJAStatus AJADebug::StatFree ( const uint32_t  inKey)
static

Unregisters/deletes the given stat.

Parameters
[in]inKeyThe timer/counter to be unregistered/deleted.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1077 of file debug.cpp.

◆ StatGetInfo()

AJAStatus AJADebug::StatGetInfo ( const uint32_t  inKey,
AJADebugStat outInfo 
)
static

Answers with the given stat's info.

Parameters
[in]inKeyThe timer/counter of interest.
[out]outInfoReceives the timer/counter info.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1222 of file debug.cpp.

◆ StatGetKeys() [1/2]

AJAStatus AJADebug::StatGetKeys ( std::set< uint32_t > &  outKeys,
uint32_t &  outSeqNum 
)
static

Queries which stats are currently allocated.

Parameters
[out]outKeysReceives the set of allocated stats.
[out]outSeqNumReceives the set change sequence number (to detect if the set changed).
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1263 of file debug.cpp.

◆ StatGetKeys() [2/2]

AJAStatus AJADebug::StatGetKeys ( std::vector< uint32_t > &  outKeys,
uint32_t &  outSeqNum 
)
static

Queries which stats are currently allocated.

Parameters
[out]outKeysReceives the list of allocated stats.
[out]outSeqNumReceives the list change sequence number (to detect if the list changed).
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1241 of file debug.cpp.

◆ StatGetSequenceNum()

AJAStatus AJADebug::StatGetSequenceNum ( uint32_t &  outSeqNum)
static

Queries the stats change sequence number, for detecting if the stats set changed).

Parameters
[out]outSeqNumReceives the current change sequence number.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1285 of file debug.cpp.

◆ StatIsAllocated()

bool AJADebug::StatIsAllocated ( const uint32_t  inKey)
static

Answers if the given stat is allocated (in use).

Parameters
[in]inKeyThe timer/counter of interest.
Returns
True if stat is allocated; otherwise false.

Definition at line 1098 of file debug.cpp.

◆ StatReset()

AJAStatus AJADebug::StatReset ( const uint32_t  inKey)
static

Resets/clears the given timer/counter stat.

Parameters
[in]inKeyThe timer/counter of interest.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1114 of file debug.cpp.

◆ StatsCapacity()

uint32_t AJADebug::StatsCapacity ( void  )
static
Returns
The capacity of the debug facility's stats buffer.

Definition at line 1044 of file debug.cpp.

◆ StatSetValue()

AJAStatus AJADebug::StatSetValue ( const uint32_t  inKey,
const uint32_t  inValue 
)
static

Records a new value for the stat.

Parameters
[in]inKeyThe counter of interest.
[in]inValueSpecifies the value.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1202 of file debug.cpp.

◆ StatTimerStart()

AJAStatus AJADebug::StatTimerStart ( const uint32_t  inKey)
static

Starts the given timer stat by recording the host OS' high-resolution clock.

Parameters
[in]inKeyThe timer of interest.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1134 of file debug.cpp.

◆ StatTimerStop()

AJAStatus AJADebug::StatTimerStop ( const uint32_t  inKey)
static

Stops the given timer stat, storing the elapsed time since the last Start call into the timer's deque of elapsed times.

Parameters
[in]inKeyThe timer of interest.
Returns
AJA_STATUS_SUCCESS if successful.

Definition at line 1154 of file debug.cpp.

◆ TotalBytes()

uint32_t AJADebug::TotalBytes ( void  )
static
Returns
The size of the debug facility's shared memory region.

Definition at line 303 of file debug.cpp.

◆ Version()

uint32_t AJADebug::Version ( void  )
static
Returns
The debug facility's version number.

Definition at line 296 of file debug.cpp.


The documentation for this class was generated from the following files: