NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
Enumerations | Functions
BiometricEvaluation::Process::MessageCenterUtility Namespace Reference

Enumerations

enum class  DescriptorType { Read , Write , Error }
 Possible types of IO descriptors. More...
 

Functions

fd_set fileDescriptorSet (int fd)
 Create a set of a single file descriptor to use with select(2). More...
 
struct timeval * createTimeout (struct timeval &timeout, int32_t numSeconds=0)
 Initialize a struct timeval. More...
 
bool dataAvailable (int fd, int32_t numSeconds, DescriptorType type=DescriptorType::Read)
 Obrain whether or not a file descriptor has data available. More...
 
uint32_t getClientID (const Memory::uint8Array &message)
 Obtain Client ID from a transmitted message. More...
 
Memory::uint8Array setClientID (uint32_t clientID, Memory::uint8Array &message)
 Encode client ID into a message. More...
 
Memory::uint8Array setClientID (uint32_t clientID, const Memory::uint8Array &message)
 Encode client ID into a message. More...
 
Memory::uint8Array getMessage (const Memory::uint8Array &message)
 Obtain message portion of transmitted message. More...
 

Enumeration Type Documentation

◆ DescriptorType

Possible types of IO descriptors.

Enumerator
Read 

Read file descriptors.

Write 

Write file descriptors.

Error 

Error file descriptors.

Definition at line 59 of file be_process_mcutility.h.

Function Documentation

◆ fileDescriptorSet()

fd_set BiometricEvaluation::Process::MessageCenterUtility::fileDescriptorSet ( int  fd)

Create a set of a single file descriptor to use with select(2).

Parameters
fdFile descriptor to add to the set.

◆ createTimeout()

struct timeval * BiometricEvaluation::Process::MessageCenterUtility::createTimeout ( struct timeval &  timeout,
int32_t  numSeconds = 0 
)

Initialize a struct timeval.

Parameters
timeoutReference to a struct timeval to populate.
numSecondsNumber of seconds before the timeout expires, or < 0 to block indefinitely.
Returns
Pointer to timeout.

◆ dataAvailable()

bool BiometricEvaluation::Process::MessageCenterUtility::dataAvailable ( int  fd,
int32_t  numSeconds,
DescriptorType  type = DescriptorType::Read 
)

Obrain whether or not a file descriptor has data available.

Parameters
fdFile descriptor to check.
numSecondsNumber of seconds to wait, or < 0 to block indefinitely.
typeThe type of IO to check for.
Returns
Whether or not data is available.
Exceptions
Error::ObjectDoesNotExistBad file descriptor (connection closed).
Error::StrategyErrorUnrecoverable error.

◆ getClientID()

uint32_t BiometricEvaluation::Process::MessageCenterUtility::getClientID ( const Memory::uint8Array message)

Obtain Client ID from a transmitted message.

Parameters
messageTransmitted message.
Returns
Client ID portion of transmitted message.

◆ setClientID() [1/2]

Memory::uint8Array BiometricEvaluation::Process::MessageCenterUtility::setClientID ( uint32_t  clientID,
Memory::uint8Array message 
)

Encode client ID into a message.

Parameters
clientIDClient ID to encode.
[in/out]message Message to send.
Returns
message with clientID encoded.

◆ setClientID() [2/2]

Memory::uint8Array BiometricEvaluation::Process::MessageCenterUtility::setClientID ( uint32_t  clientID,
const Memory::uint8Array message 
)

Encode client ID into a message.

Parameters
clientIDClient ID to encode.
[in]messageMessage to send.
Returns
Copy of message with clientID encoded.

◆ getMessage()

Memory::uint8Array BiometricEvaluation::Process::MessageCenterUtility::getMessage ( const Memory::uint8Array message)

Obtain message portion of transmitted message.

Parameters
messageTransmitted message.
Returns
Message portion of message (no ID).